tag:blogger.com,1999:blog-53203503187411336252024-02-22T01:01:51.339-08:00RRave WebblogThis blog dedicated for Compact framework base device applications,Windows Mobile base device applications,Common Microsoft Programming Languages(C#,VB.net,C++) and ASP.NET.Since all the posts and articles are based on those Technologies.RRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.comBlogger27125tag:blogger.com,1999:blog-5320350318741133625.post-81734891562524104932010-10-21T01:36:00.001-07:002010-10-21T01:36:31.670-07:00The New .NET Community web PortalDear My Friends,<br /><br />I have launch the new .NET Community website to help to all developers and software professionals than more this blog.<br /><br />Please visitor, you can find all latest technologies articles, tips and codesnippet in <a href="http://www.codegain.com">www.codegain.com</a><br /><br />even you can publish your blog or articles and etc in <a href="http://www.codegain.com">www.codegain.com</a><br /><br />I'm planning to open article competition,it will help to all the developers and software professional to show their talent and earn or win free gifts and cash prizes.<br /><br /><br />Thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com1tag:blogger.com,1999:blog-5320350318741133625.post-51096420176224973422009-05-04T05:41:00.000-07:002009-05-04T05:44:27.386-07:00SMTP error code and descriptionsHi Guys,<br /><br />Here List of error code and description for the possible error in SMTP.<br /><br /><span style="font-weight:bold;">Error code and Description List</span><br /><br />421 Service not available, closing transmission channel (This may be a reply to any command if the service knows it must shut down)<br />450 Requested mail action not taken: mailbox unavailable (E.g., mailbox busy)<br />451 Requested action aborted: local error in processing<br />452 Requested action not taken: insufficient system storage<br />500 Syntax error, command unrecognized (This may include errors such as command line too long)<br />501 Syntax error in parameters or arguments<br />502 Command not implemented<br />503 Bad sequence of commands<br />504 Command parameter not implemented<br />550 Requested action not taken: mailbox unavailable (E.g., mailbox not found, no access)<br />551 User not local; please try<br />552 Requested mail action aborted: exceeded storage allocation<br />553 Requested action not taken: mailbox name not allowed (E.g., mailbox syntax incorrect)<br />554 Transaction failed<br /><br />The other codes that provide you with helpful information about what's happening with your messages are:<br /><br />211 System status, or system help reply<br />214 Help message (Information on how to use the receiver or the meaning of a particular non-standard command; this reply is useful<br />only to the human user)<br />220 Service ready<br />221 Service closing transmission channel<br />250 Requested mail action okay, completed<br />251 User not local; will forward to<br />354 Start mail input; end with . (a dot)<br /><br />I think its make error free email component.<br /><br />Thank you<br />Keep It WatchRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-80261330040921237212009-05-01T20:57:00.000-07:002009-05-02T21:54:42.966-07:00How to deploy crysatl report to server with asp.netHi Guys,<br /><br />Most of the developer has a doubt how they could deploy crystal report with asp.net on server, what are component they need to deploy?.<br /><br />here full explanation about Deployment and license.<br /><br />A common misconception about deploying a Crystal Reports application written in ASP.NET is that the remote server must have the Crystal Reports .NET server components installed. The only thing to keep in mind is that you must purchase a licensed copy of Crystal Reports from Business Objects (<a href="www.businessobjects.com">www.businessobjects.com</a>) in order to deploy your application to a remote server. The license for the version that comes shipped with Visual Studio .NET is just for evaluation and only works on the local development machine. <br /><br />The issue that developers run into is how the Crystal Reports Developer tool is installed on the development machine. When installed, the developer tool installs the server components into the following directory:<br /><br />C:\Program Files\Common Files\Crystal Decisions\2.5\managed<br /><br />From there, the components are registered into the local machine's Global Assembly Cache (GAC) located in C:\windows\assembly. If you are using Visual Studio .NET to develop your application, then you reference the Crystal Decisions classes from the GAC. This is fine when you run the application on the local machine. But when you deploy the application to the remote server, by default you will get an error because the Crystal Decisions components are not registered in the remote server's GAC. Here is how you work around this issue.<br /><br />For all of the classes your application references, you need to go to the above Common Files directory and copy the matching DLL files to your application bin folder. The bin folder is located in the root of your Visual Studio .NET application. Once you have copied the DLLs, remove any old references from your Visual Studio .NET application. You will find this setting in Solution Explorer under References. Right-click any CrystalDecisions.* reference and select Remove. Then right-click on Reference and select Add Reference. Click Browse, where the default directory should be your application's root, and double-click the bin directory. Select the Crystal Decisions components and click Open and then OK. Recompile your application, and upload it to the remote application. Make sure you upload all of the contents of the bin folder.<br /><br />With the steps above, you should not have any issues deploying your Crystal Reports application built with Visual Studio .NET. If you are still using classic ASP to generate your Crystal Reports, then the components still have to be registered on the server: either use the Installation CD or extract the components and manually register the components on the web server using regsvr32.exe or a COM+ package. You can find additional support information at <a href="www.businessobjects.com/support/default.asp">www.businessobjects.com/support/default.asp</a>. <br /><br /><br />Thank you<br />Keep It WatchRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-54945891752002954622009-04-24T10:08:00.000-07:002009-04-24T10:14:13.415-07:00My latest Article in HighonCoding.comHi Guys<br /><br />Recently i worked few new concept in windows mobile and published on the highoncoding.com.The links are here for your look.<br /><a href="http://www.highoncoding.com/Articles/552_How_to_Run_Multi_Threaded_Windows_Mobile_Application_with_High_Performance.aspx"><br />http://www.highoncoding.com/Articles/552_How_to_Run_Multi_Threaded_Windows_Mobile_Application_with_High_Performance.aspx</a><br /><br /><a href="http://www.highoncoding.com/Articles/551_How_to_Access_SQL_Server_2005_from_the_Windows_Mobile_Devices.aspx">http://www.highoncoding.com/Articles/551_How_to_Access_SQL_Server_2005_from_the_Windows_Mobile_Devices.aspx</a><br /><br />Thank you so much<br />Keep It WatchRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-19846170595880446152009-04-24T10:05:00.000-07:002009-04-24T10:08:41.148-07:00The great video demostrations for Windows mobileHi Guys<br /><br />Recently i visit a great web portal , there lots of Video demonstration for Windows Mobile Developers.<br /><br />few links are here<br /><br /><a href="http://www.mrbool.com/articles/viewcomp.asp?comp=12351">http://www.mrbool.com/articles/viewcomp.asp?comp=12351</a><br /><br /><a href="http://www.mrbool.com/articles/viewcomp.asp?comp=12332">http://www.mrbool.com/articles/viewcomp.asp?comp=12332</a><br /><br />Thank you So much<br />Keep it watchRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com1tag:blogger.com,1999:blog-5320350318741133625.post-91642705309901936912009-04-06T01:32:00.000-07:002009-04-06T01:34:22.595-07:00how to incorporate WSDL file within the .NET projectHi Guys<br /><br />Sometimes we need incorporate WSDL file(Web service ) to our .net project.<br /><br />Please read this link to achieve this.<br /><br /><a href="http://msdn.microsoft.com/en-us/library/7h3ystb6.aspx">http://msdn.microsoft.com/en-us/library/7h3ystb6.aspx</a><br /><br />Thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-63250941439316270852008-09-10T19:25:00.001-07:002008-09-10T19:32:29.262-07:00Full Screen featues in Windows mobile.Hi Guys,<br /><br />I look msdn forums last few days,in the forum many guys asked about the full screen features in windows mobile. Since i will post here my code for that.<br /><br />The full screen features we can do by two ways.<br />1. We can do simplify in Windows mobile 5.0 or later like hide the menu,give empty text and set widows state is maximized.<br />2.we can do by the calling P/Invoke.<br /> it's little interesting, because of OS API have a interesting method "<a href="http://msdn.microsoft.com/en-us/library/aa453694.aspx">SHFullScreen</a>"<br /><br />So when we pass our current form handle and window states to this method it's done.<br /><br />before that we must get window handle to for current window.<br /><br />so sample code below<br /><br /> public class WinAPI<br /> {<br /><br /> internal const int SHFS_SHOWTASKBAR = 0x0001;<br /> internal const int SHFS_HIDETASKBAR = 0x0002;<br /> internal const int SHFS_SHOWSIPBUTTON = 0x0004;<br /> internal const int SHFS_HIDESIPBUTTON = 0x0008;<br /> internal const int SHFS_SHOWSTARTICON = 0x0010;<br /> internal const int SHFS_HIDESTARTICON = 0x0020;<br /> // Code used to hide the Windows bar<br /><br /> [DllImport("aygshell.dll", EntryPoint = "SHFullScreen", SetLastError = true)]<br /> internal static extern bool SHFullScreen(IntPtr hwndRequester, int dwState);<br /> [DllImport("coredll.dll", EntryPoint = "GetForegroundWindow", SetLastError = true)]<br /> internal static extern IntPtr GetForegroundWindow();<br /> [DllImport("coredll.dll")]<br /> public static extern IntPtr GetCapture();<br /> // Code used to hide the Windows bar<br /> public static void FullScreen()<br /> {<br /> IntPtr hwnd = GetForegroundWindow();<br /> SHFullScreen(hwnd, SHFS_HIDETASKBAR);<br /> }<br /> }<br /><br />that's all<br /><br />thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com1tag:blogger.com,1999:blog-5320350318741133625.post-82850595748728733892008-09-04T22:51:00.000-07:002008-09-04T22:53:47.817-07:00Hi How to use the System State in Windows mobileHi Guys<br /><br />here simple sample how to use the system state class in windows mobile.<br /><br /><span style="font-weight:bold;">Question</span>: How to check the cradlepresent in the Windows mobile Device or Emulator ?<br /><br /><span style="font-weight:bold;">Answers</span>:<br /><br /> SystemState cradleState = null;<br /><br /> private void Init()<br /> {<br /> cradleState = new SystemState(SystemProperty.CradlePresent);<br /> cradleState.Changed += new ChangeEventHandler(cradleState_Changed);<br /> }<br /><br /> void cradleState_Changed(object sender, ChangeEventArgs args)<br /> {<br /> bool isPresent =Convert.ToBoolean(SystemState.GetValue(SystemProperty.CradlePresent));<br /> if (isPresent)<br /> {<br /> MessageBox.Show("Present");<br /> }<br /> }<br /><br />thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-70468375752659874872008-09-04T22:48:00.000-07:002008-09-04T22:50:55.862-07:00All System States in WIndows mobileHi Guys<br /><br />see here list of all System states.<br /><br />using System;<br /><br />namespace Microsoft.WindowsMobile.Status<br />{<br /> // Summary:<br /> // Specifies the device-wide system properties<br /> public enum SystemProperty<br /> {<br /> // Summary:<br /> // Gets the name of the application that was previously active and the name<br /> // of the application that is currently active, separated by the 'Escape' character<br /> // ('\e').<br /> ActiveApplication = 0,<br /> //<br /> // Summary:<br /> // Gets the orientation of the display, specified as the number of degrees,<br /> // ranging from 0 to 360. Portrait = 0. Landscape = 90 or -90.<br /> DisplayRotation = 1,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether a keyboard is attached and enabled.<br /> KeyboardPresent = 2,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the device is connected to a cradle.<br /> CradlePresent = 3,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether a camera is attached and enabled.<br /> CameraPresent = 4,<br /> //<br /> // Summary:<br /> // Gets the number of unread SMS messages.<br /> MessagingSmsUnread = 5,<br /> //<br /> // Summary:<br /> // Gets the number of unread MMS messages<br /> MessagingMmsUnread = 6,<br /> //<br /> // Summary:<br /> // Gets the number of unplayed voice mail messages.<br /> MessagingVoiceMailTotalUnread = 7,<br /> //<br /> // Summary:<br /> // Gets the number of unplayed voice mail messages for line 1.<br /> MessagingVoiceMail1Unread = 8,<br /> //<br /> // Summary:<br /> // Gets the number of unplayed voice mail messages for line 2<br /> MessagingVoiceMail2Unread = 9,<br /> //<br /> // Summary:<br /> // Gets the number of unread ActiveSync e-mail messages.<br /> MessagingActiveSyncEmailUnread = 10,<br /> //<br /> // Summary:<br /> // Gets the total number of unread e-mail messages from all POP3/IMAP accounts.<br /> MessagingTotalEmailUnread = 11,<br /> //<br /> // Summary:<br /> // Gets the number of unread e-mail messages from all non-ActiveSync messaging<br /> // accounts.<br /> MessagingOtherEmailUnread = 12,<br /> //<br /> // Summary:<br /> // Gets the name of the e-mail account that was last active.<br /> MessagingLastEmailAccountName = 13,<br /> //<br /> // Summary:<br /> // Gets the name of the SMS messaging account.<br /> MessagingSmsAccountName = 14,<br /> //<br /> // Summary:<br /> // Gets the name of the MMS messaging account.<br /> MessagingMmsAccountName = 15,<br /> //<br /> // Summary:<br /> // Get the name of the Outlook e-mail messaging account.<br /> MessagingActiveSyncAccountName = 16,<br /> //<br /> // Summary:<br /> // Gets the number of active tasks.<br /> TasksActive = 17,<br /> //<br /> // Summary:<br /> // Gets the number of high priority tasks that are currently active.<br /> TasksHighPriority = 18,<br /> //<br /> // Summary:<br /> // Gets the number of active tasks that are due today.<br /> TasksDueToday = 19,<br /> //<br /> // Summary:<br /> // Gets the number of overdue tasks.<br /> TasksOverdue = 20,<br /> //<br /> // Summary:<br /> // Gets the subject of the next Appointment.<br /> CalendarNextAppointmentSubject = 21,<br /> //<br /> // Summary:<br /> // Gets the location of the next Appointment.<br /> CalendarNextAppointmentLocation = 22,<br /> //<br /> // Summary:<br /> // Gets the starting time of the next Appointment.<br /> CalendarNextAppointmentStart = 23,<br /> //<br /> // Summary:<br /> // Gets the ending time of the next Appointment.<br /> CalendarNextAppointmentEnd = 24,<br /> //<br /> // Summary:<br /> // Gets the album artist's name of the currently playing track in Windows Media<br /> // Player.<br /> MediaPlayerAlbumArtist = 25,<br /> //<br /> // Summary:<br /> // Gets the title of the track currently playing in Windows Media Player. For<br /> // example, "128Kbps"<br /> MediaPlayerTrackBitrate = 26,<br /> //<br /> // Summary:<br /> // Gets the title of the track currently playing in Windows Media Player.<br /> MediaPlayerTrackTitle = 27,<br /> //<br /> // Summary:<br /> // Gets the album title of the currently playing track in Windows Media Player.<br /> MediaPlayerAlbumTitle = 28,<br /> //<br /> // Summary:<br /> // Gets the artist's name of the currently playing track in Windows Media Player.<br /> MediaPlayerTrackArtist = 29,<br /> //<br /> // Summary:<br /> // Gets the number of the current track playing in Windows Media Player.<br /> MediaPlayerTrackNumber = 30,<br /> //<br /> // Summary:<br /> // Gets the genre of the currently playing track in Windows Media Player.<br /> MediaPlayerTrackGenre = 31,<br /> //<br /> // Summary:<br /> // Gets the elapsed time (in milliseconds) of the currently playing track in<br /> // Windows Media Player.<br /> MediaPlayerTrackTimeElapsed = 32,<br /> //<br /> // Summary:<br /> // Gets the remaining battery power level, expressed as a percentage of fully<br /> // charged.<br /> PowerBatteryStrength = 33,<br /> //<br /> // Summary:<br /> // Gets the current battery state (for example, it is low, and charging). This<br /> // enumeration allows a bitwise combination of its member values.<br /> PowerBatteryState = 34,<br /> //<br /> // Summary:<br /> // Gets the remaining backup battery power level, expressed as a percentage<br /> // of fully charged.<br /> PowerBatteryBackupStrength = 35,<br /> //<br /> // Summary:<br /> // Gets the current backup battery state (for example, it is low, and charging).<br /> // This enumeration allows a bitwise combination of its member values.<br /> PowerBatteryBackupState = 36,<br /> //<br /> // Summary:<br /> // Gets the current time. This Date/Time value updates once per minute.<br /> Time = 37,<br /> //<br /> // Summary:<br /> // Gets the current date. This Date/Time value changes once per day. Monitor<br /> // this property to perform actions on a daily basis. Note: Do not use Date<br /> // to get an accurate clock time; instead, use Time.<br /> Date = 38,<br /> //<br /> // Summary:<br /> // Get the phone signal strength, expressed as a percentage of full strength.<br /> PhoneSignalStrength = 39,<br /> //<br /> // Summary:<br /> // Gets the name of the mobile operator (i.e., the mobile phone company, or<br /> // carrier).<br /> PhoneOperatorName = 40,<br /> //<br /> // Summary:<br /> // Gets the name of the person you are talking to on the phone. This value is<br /> // not set when you are talking on a conference call.<br /> PhoneTalkingCallerName = 41,<br /> //<br /> // Summary:<br /> // Gets the number of active phone calls.<br /> PhoneActiveCallCount = 42,<br /> //<br /> // Summary:<br /> // Gets the localized name of the current sound profile. (Smartphone only)<br /> PhoneProfileName = 43,<br /> //<br /> // Summary:<br /> // Gets the non-localized name of the current sound profile. For example, "Normal",<br /> // "Silent", "Car", "Headset", "Loud", "Meeting", or "Speakerphone". (Smartphone<br /> // only)<br /> PhoneProfile = 44,<br /> //<br /> // Summary:<br /> // Gets the cell broadcast message<br /> PhoneCellBroadcast = 45,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether there is a conflict with the next Appointment.<br /> CalendarNextAppointmentHasConflict = 46,<br /> //<br /> // Summary:<br /> // Gets the mobile device owner's name.<br /> OwnerName = 47,<br /> //<br /> // Summary:<br /> // Gets the mobile device owner's phone number.<br /> OwnerPhoneNumber = 48,<br /> //<br /> // Summary:<br /> // Gets the mobile device owner's e-mail address.<br /> OwnerEmail = 49,<br /> //<br /> // Summary:<br /> // Gets the text notes entered by the owner of the mobile device.<br /> OwnerNotes = 50,<br /> //<br /> // Summary:<br /> // Gets ActiveSync's current synchronization state.<br /> ActiveSyncStatus = 51,<br /> //<br /> // Summary:<br /> // Gets the number of missed phone calls.<br /> PhoneMissedCalls = 52,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether a headset is present<br /> HeadsetPresent = 53,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether a car kit is present<br /> CarKitPresent = 54,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the speakerphone is active<br /> SpeakerPhoneActive = 55,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone supports multiple lines.<br /> PhoneMultiLine = 56,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the Subscriber Identity Module (SIM) memory<br /> // is full.<br /> PhoneSimFull = 57,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the Subscriber Identity Module (SIM) is installed<br /> // in the mobile device.<br /> PhoneNoSim = 58,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the Subscriber Identity Module (SIM) is invalid.<br /> PhoneInvalidSim = 59,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the Subscriber Identity Module (SIM) is blocked.<br /> PhoneBlockedSim = 60,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone's radio is turned off.<br /> PhoneRadioOff = 61,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the mobile device has a phone.<br /> PhoneRadioPresent = 62,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone's ringer is off (i.e., if it rings<br /> // and/or vibrates).<br /> PhoneRingerOff = 63,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether line 1 is selected.<br /> PhoneLine1Selected = 64,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether line 2 is selected.<br /> PhoneLine2Selected = 65,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone is currently in roaming mode.<br /> PhoneRoaming = 66,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether call forwarding is enabled on line 1.<br /> PhoneCallForwardingOnLine1 = 67,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether there was a new missed call.<br /> PhoneMissedCall = 68,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone has an active cellular data connection.<br /> PhoneActiveDataCall = 69,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the call barring feature is enabled.<br /> PhoneCallBarring = 70,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether a phone call is currently on hold.<br /> PhoneCallOnHold = 71,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether a conference call is currently in progress.<br /> PhoneConferenceCall = 72,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether there is an incoming (ringing) call.<br /> PhoneIncomingCall = 73,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone is currently attempting to connect<br /> // an outgoing call.<br /> PhoneCallCalling = 74,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone currently has GPRS coverage.<br /> PhoneGprsCoverage = 75,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone is not currently connected to a<br /> // network.<br /> PhoneNoService = 76,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone is currently searching for service<br /> // on a network.<br /> PhoneSearchingForService = 77,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone is currently registered on its<br /> // home network.<br /> PhoneHomeService = 78,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the phone currently has 1xRTT coverage.<br /> Phone1xRttCoverage = 79,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether there is currently a phone call in the talking<br /> // state.<br /> PhoneCallTalking = 80,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether call forwarding is currently active on line<br /> // 2.<br /> PhoneCallForwardingOnLine2 = 81,<br /> //<br /> // Summary:<br /> // Gets the next Appointment.<br /> CalendarNextAppointment = 82,<br /> //<br /> // Summary:<br /> // Gets the user's availability (e.g., Free, Busy, Tenative, Out of Office)<br /> // status for the next Appointment.<br /> CalendarNextAppointmentBusyStatus = 83,<br /> //<br /> // Summary:<br /> // Gets the next Appointment's categories.<br /> CalendarNextAppointmentCategories = 84,<br /> //<br /> // Summary:<br /> // Gets the current Appointment.<br /> CalendarAppointment = 85,<br /> //<br /> // Summary:<br /> // Gets the current Appointment's subject.<br /> CalendarAppointmentSubject = 86,<br /> //<br /> // Summary:<br /> // Gets the current Appointment's location.<br /> CalendarAppointmentLocation = 87,<br /> //<br /> // Summary:<br /> // Gets the current Appointment's starting time.<br /> CalendarAppointmentStartTime = 88,<br /> //<br /> // Summary:<br /> // Gets the current Appointment's ending time.<br /> CalendarAppointmentEndTime = 89,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the current Appointment has a scheduling<br /> // conflict with an existing Appointment.<br /> CalendarAppointmentHasConflict = 90,<br /> //<br /> // Summary:<br /> // Gets the user's availability (free/busy status) for the time-slot taken by<br /> // the current Appointment.<br /> CalendarAppointmentBusyStatus = 91,<br /> //<br /> // Summary:<br /> // Gets the current Appointment's categories.<br /> CalendarAppointmentCategories = 92,<br /> //<br /> // Summary:<br /> // Gets the Appointment that is currently displayed on the Home Screen.<br /> CalendarHomeScreenAppointment = 93,<br /> //<br /> // Summary:<br /> // Gets the subject of the Appointment that is currently displayed on the Home<br /> // Screen.<br /> CalendarHomeScreenAppointmentSubject = 94,<br /> //<br /> // Summary:<br /> // Gets the location of the Appointment that is currently displayed on the Home<br /> // Screen.<br /> CalendarHomeScreenAppointmentLocation = 95,<br /> //<br /> // Summary:<br /> // Gets the starting time of the Appointment that is currently displayed on<br /> // the Home Screen.<br /> CalendarHomeScreenAppointmentStartTime = 96,<br /> //<br /> // Summary:<br /> // Gets the ending time of the Appointment that is currently displayed on the<br /> // Home Screen.<br /> CalendarHomeScreenAppointmentEndTime = 97,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the Appointment that is currently displayed<br /> // on the Home Screen has a scheduling conflict.<br /> CalendarHomeScreenAppointmentHasConflict = 98,<br /> //<br /> // Summary:<br /> // Gets the user's availability (free/busy status) for the Appointment displayed<br /> // on the Home Screen.<br /> CalendarHomeScreenAppointmentBusyStatus = 99,<br /> //<br /> // Summary:<br /> // Gets the categories of the Appointment that is currently displayed on the<br /> // Home Screen.<br /> CalendarHomeScreenAppointmentCategories = 100,<br /> //<br /> // Summary:<br /> // Gets the name of the person who is currently placing the incoming call.<br /> PhoneIncomingCallerName = 101,<br /> //<br /> // Summary:<br /> // Gets the name of the last caller to place an incoming call.<br /> PhoneLastIncomingCallerName = 102,<br /> //<br /> // Summary:<br /> // Gets the incoming call's phone number (Caller ID).<br /> PhoneIncomingCallerNumber = 103,<br /> //<br /> // Summary:<br /> // Gets the last incoming call's phone number (Caller ID).<br /> PhoneLastIncomingCallerNumber = 104,<br /> //<br /> // Summary:<br /> // Gets the name of the property that matches the Caller ID, e.g. "h" for "Home<br /> // Telephone".<br /> PhoneIncomingCallerContactPropertyName = 105,<br /> //<br /> // Summary:<br /> // Gets the name of the property that matches the last Caller ID, e.g. "h" for<br /> // "Home Telephone".<br /> PhoneLastIncomingCallerContactPropertyName = 106,<br /> //<br /> // Summary:<br /> // Gets the CEPROPID of the property that matches the Caller ID, for example,<br /> // PIMPR_HOME_TELEPHONE_NUMBER.<br /> PhoneIncomingCallerContactPropertyID = 107,<br /> //<br /> // Summary:<br /> // Gets the CEPROPID of the property that matches the last Caller ID, for example,<br /> // PIMPR_HOME_TELEPHONE_NUMBER.<br /> PhoneLastIncomingCallerContactPropertyID = 108,<br /> //<br /> // Summary:<br /> // Gets the Contact that matches the Caller ID.<br /> PhoneIncomingCallerContact = 109,<br /> //<br /> // Summary:<br /> // Gets the Contact that matches the last Caller ID.<br /> PhoneLastIncomingCallerContact = 110,<br /> //<br /> // Summary:<br /> // Gets the currently connected caller's phone number.<br /> PhoneTalkingCallerNumber = 111,<br /> //<br /> // Summary:<br /> // Gets the name of the property of the contact who is on the active phone call,<br /> // e.g. "h" for "Home Telephone".<br /> PhoneTalkingCallerContactPropertyName = 112,<br /> //<br /> // Summary:<br /> // Gets the CEPROPID of the property of the contact who is on the active phone<br /> // call, for example, PIMPR_HOME_TELEPHONE_NUMBER.<br /> PhoneTalkingCallerContactPropertyID = 113,<br /> //<br /> // Summary:<br /> // Gets the contact who is on the active phone call.<br /> PhoneTalkingCallerContact = 114,<br /> //<br /> // Summary:<br /> // Gets a value indicating the number of connections that are currently connected.<br /> ConnectionsCount = 115,<br /> //<br /> // Summary:<br /> // Gets a value indicating the number of Bluetooth connections that are currently<br /> // connected.<br /> ConnectionsBluetoothCount = 116,<br /> //<br /> // Summary:<br /> // Gets a semicolon delimited string containing the description of each of the<br /> // Bluetooth connections.<br /> ConnectionsBluetoothDescriptions = 117,<br /> //<br /> // Summary:<br /> // Gets a value indicating the number of cellular connections that are currently<br /> // connected.<br /> ConnectionsCellularCount = 118,<br /> //<br /> // Summary:<br /> // Gets a semicolon delimited string containing the description of each cellular<br /> // connection.<br /> ConnectionsCellularDescriptions = 119,<br /> //<br /> // Summary:<br /> // Gets a value indicating the number of network connections that are currently<br /> // connected.<br /> ConnectionsNetworkCount = 120,<br /> //<br /> // Summary:<br /> // Gets a semicolon delimited string containing the description of each network<br /> // connection.<br /> ConnectionsNetworkDescriptions = 121,<br /> //<br /> // Summary:<br /> // Gets a semicolon delimited string containing the adapter name of each network<br /> // connection.<br /> ConnectionsNetworkAdapters = 122,<br /> //<br /> // Summary:<br /> // Gets a value indicating the number of desktop connections that are currently<br /> // connected.<br /> ConnectionsDesktopCount = 123,<br /> //<br /> // Summary:<br /> // Gets a semicolon delimited string containing the description of each desktop<br /> // connection.<br /> ConnectionsDesktopDescriptions = 124,<br /> //<br /> // Summary:<br /> // Gets a value indicating the number of network connections that are currently<br /> // connected.<br /> ConnectionsProxyCount = 125,<br /> //<br /> // Summary:<br /> // Gets a semicolon delimited string containing the description of each proxy<br /> // connection.<br /> ConnectionsProxyDescriptions = 126,<br /> //<br /> // Summary:<br /> // Gets a value indicating the number of modem connections that are currently<br /> // connected.<br /> ConnectionsModemCount = 127,<br /> //<br /> // Summary:<br /> // Gets a semicolon delimited string containing the description of each modem<br /> // connection.<br /> ConnectionsModemDescriptions = 128,<br /> //<br /> // Summary:<br /> // Gets a value indicating the number of connections of unknown type that are<br /> // currently connected.<br /> ConnectionsUnknownCount = 129,<br /> //<br /> // Summary:<br /> // Gets a semicolon delimited string containing the description of each connections<br /> // of unknown type.<br /> ConnectionsUnknownDescriptions = 130,<br /> //<br /> // Summary:<br /> // Gets a value indicating the number of virtual private network connections<br /> // that are currently connected.<br /> ConnectionsVpnCount = 131,<br /> //<br /> // Summary:<br /> // Gets a semicolon delimited string containing the description of each virtual<br /> // private network connection.<br /> ConnectionsVpnDescriptions = 132,<br /> //<br /> // Summary:<br /> // Gets the current "All Day Event" Appointment.<br /> CalendarEvent = 133,<br /> //<br /> // Summary:<br /> // Gets the subject of the current "All Day Event" Appointment.<br /> CalendarEventSubject = 134,<br /> //<br /> // Summary:<br /> // Gets the location of the current "All Day Event" Appointment.<br /> CalendarEventLocation = 135,<br /> //<br /> // Summary:<br /> // Gets the starting time of the current "All Day Event" Appointment. This will<br /> // be the starting day of an Appointment Event that spans multiple days.<br /> CalendarEventStartTime = 136,<br /> //<br /> // Summary:<br /> // Gets the ending time of the current "All Day Event" Appointment. This will<br /> // be the starting day of an Appointment Event that spans multiple days.<br /> CalendarEventEndTime = 137,<br /> //<br /> // Summary:<br /> // Gets a value indicating whether the user's availability (free/busy) status<br /> // conflicts with the current "All Day Event".<br /> CalendarEventHasConflict = 138,<br /> //<br /> // Summary:<br /> // Gets the user's availability (free/busy status) for the current "All Day<br /> // Event".<br /> CalendarEventBusyStatus = 139,<br /> //<br /> // Summary:<br /> // Gets the categories for the current "All Day Event".<br /> CalendarEventCategories = 140,<br /> }<br />}<br /><br /><br />thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-2542248732192075652008-07-22T21:16:00.000-07:002008-07-22T21:40:39.780-07:00Get List of threads in Windows MObile.Hi Guys,<br /><br />it's another nice good morning, because of when i look MS forums last night, one guy asked , how can get list of threads in .net CF. then i tried work out in my home. then it's come sounds is good.<br /><br />Here code for you.<br /><br />first i want to create threadentry32 structure.<br /> class THREADENTRY32<br /> {<br /> <br /> public uint cntUsage; <br /> public uint dwFlags;<br /> public uint dwSize;<br /> public uint th32AccessKey;<br /> public uint th32CurrentProcessID;<br /> public uint th32OwnerProcessID;<br /> public uint th32ThreadID;<br /> public int tpBasePri;<br /> public int tpDeltaPri;<br />public THREADENTRY32()<br />{<br />}<br /> public THREADENTRY32(byte[] aData)<br /> {<br /> this.dwSize = BitConverter.ToUInt32(aData, 0);<br /> this.cntUsage = BitConverter.ToUInt32(aData, 4);<br /> this.th32ThreadID =BitConverter.ToUInt32(aData, 8);<br /> this.th32OwnerProcessID = BitConverter.ToUInt32(aData, 12);<br /> this.tpBasePri = BitConverter.ToInt32(aData, 0x10);<br /> this.tpDeltaPri = BitConverter.ToInt32(aData, 0x18);<br /> this.dwFlags = BitConverter.ToUInt32(aData, 0x20);<br /> this.th32AccessKey = BitConverter.ToUInt32(aData, 0x24);<br /> this.th32CurrentProcessID = BitConverter.ToUInt32(aData, 40);<br /> }<br /><br /> public byte[] ToByteArray()<br /> {<br /> byte[] aData = new byte[0x2c];<br /> Util.SetUInt(aData, 0, 0x2c);<br /> return aData;<br /> }<br /><br />}<br /><br />then i want to get snapshot for thread collections.<br /><br />if i want to get thread snapshot olny , flag should be 4.<br /><br /><br />[DllImport("toolhelp.dll", EntryPoint = "CreateToolhelp32Snapshot", SetLastError = true)]<br /> private static extern IntPtr CreateToolhelp32SnapshotAPI(uint flags, uint processid);<br /><br /> [DllImport("toolhelp.dll", EntryPoint = "CloseToolhelp32Snapshot", SetLastError = true)]<br /> private static extern int CloseToolhelp32SnapshotAPI(IntPtr handle); <br /><br /> [DllImport("toolhelp.dll", EntryPoint = "Thread32First", SetLastError = true)]<br /> private static extern int Thread32FirstAPI(IntPtr handle, byte[] te);<br /><br /> [DllImport("toolhelp.dll", EntryPoint = "Thread32Next", SetLastError = true)]<br /> private static extern int Thread32NextAPI(IntPtr handle, byte[] te);<br /><br />public static THREADENTRY32[] GetThreads(uint processID)<br /> {<br /> ArrayList list = new ArrayList();<br /> IntPtr handle = CreateToolhelp32Snapshot(4, processID);<br /> if (((int) handle) <= 0)<br /> {<br /> throw new Exception("Unable to create snapshot");<br /> }<br /> try<br /> {<br /> byte[] te = new THREADENTRY32().ToByteArray();<br /> for (int i = Thread32First(handle, te); i == 1; i = Thread32Next(handle, te))<br /> {<br /> THREADENTRY32 threadentry = new THREADENTRY32(te);<br /> if ((processID == 0) || (threadentry.th32OwnerProcessID == processID))<br /> {<br /> THREADENTRY32entry = new THREADENTRY32(threadentry);<br /> list.Add(entry);<br /> }<br /> }<br /> }<br /> catch (Exception exception)<br /> {<br /> throw new Exception("Exception: " + exception.Message);<br /> }<br /> CloseToolhelp32Snapshot(handle);<br /> return (THREADENTRY32[]) list.ToArray(typeof(THREADENTRY32));<br /> }<br /><br /><br />That's all<br /><br />try and give a feedback.RRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com2tag:blogger.com,1999:blog-5320350318741133625.post-67886278841375612722008-07-19T18:07:00.000-07:002008-07-19T18:11:02.044-07:00Gradient Button in Windows mobile.Hi Guys,<br />Again in this post series, today gradient button in windows mobile with managed code.<br /><br />it's pretty simple,and when are finished it's look cool and nice.<br /><br />i had posted my article in the <a href="http://www.codeproject.com">www.codeproject.com</a><br /><br />here link for you all.<br /><br /><a href="http://www.codeproject.com/KB/mobile/Gradient_bt_NETCF.aspx">http://www.codeproject.com/KB/mobile/Gradient_bt_NETCF.aspx</a><br /><br />Enjoy .RRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-35184204698230413892008-07-16T05:07:00.000-07:002008-07-16T05:08:52.383-07:00Get IP address in Windows MObileHi Guys,<br /><br />Get IP address of the device, when they connected to network.<br /><br /> private void GetMyIP()<br /> {<br /> IPHostEntry hostentry = Dns.GetHostEntry(Dns.GetHostName());<br /> if (hostentry != null)<br /> {<br /> IPAddress[] collectionOfIPs = hostentry.AddressList;<br /> MessageBox.Show(collectionOfIPs[0].ToString());<br /> }<br /> }<br /><br />Thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com3tag:blogger.com,1999:blog-5320350318741133625.post-26372452899134680932008-07-15T21:26:00.001-07:002008-07-15T21:34:49.302-07:00Gradient BackGround in Windows mobileHi Guys,<br /><br />Another cool stuff in this series, how make to gradient background in Windows mobile device forms?.<br /><br />MSDN have answer for above question. because of .NET CF haven't support directly draw Gradient Background, but Win CE API Have support, so we can play with P/Invoke, can make a cool and pretty background. <br /><br />Just Sample here<br /><br /><a href="http://msdn.microsoft.com/en-us/library/ms229655.aspx">http://msdn.microsoft.com/en-us/library/ms229655.aspx</a><br /><br />Thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-84777145402623788582008-07-15T21:17:00.000-07:002008-07-15T21:35:47.868-07:00Load Image to PictureBox in Windows MobileHi guys,
<br />Another cool stuff, many guys, asking in MS forums, how load the image to picture box from the device directory. it's pretty easy, there have many ways.
<br />
<br />1.loan image directly from the location
<br />2. load the image from the memory stream.
<br />
<br />So here code for you
<br />
<br />1.
<br /><span id="_ctl0_MainContent_PostFlatView"><span><span style=";font-family:Arial;font-size:85%;"><span style=";font-family:Calibri;font-size:100%;">pictureBox.Image = new Bitmap (“Full.Path.To.Bitmpap.”);
<br />
<br />2.
<br /></span></span></span></span><meta equiv="Content-Type" content="text/html; charset=utf-8"><meta name="ProgId" content="Word.Document"><meta name="Generator" content="Microsoft Word 12"><meta name="Originator" content="Microsoft Word 12"><link rel="File-List" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"><link rel="themeData" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"><link rel="colorSchemeMapping" href="file:///C:%5CDOCUME%7E1%5CADMINI%7E1%5CLOCALS%7E1%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"><!--[if gte mso 9]><xml> <w:worddocument> <w:view>Normal</w:View> <w:zoom>0</w:Zoom> <w:trackmoves/> <w:trackformatting/> <w:punctuationkerning/> <w:validateagainstschemas/> <w:saveifxmlinvalid>false</w:SaveIfXMLInvalid> <w:ignoremixedcontent>false</w:IgnoreMixedContent> <w:alwaysshowplaceholdertext>false</w:AlwaysShowPlaceholderText> <w:donotpromoteqf/> <w:lidthemeother>EN-US</w:LidThemeOther> <w:lidthemeasian>X-NONE</w:LidThemeAsian> <w:lidthemecomplexscript>X-NONE</w:LidThemeComplexScript> <w:compatibility> <w:breakwrappedtables/> <w:snaptogridincell/> <w:wraptextwithpunct/> <w:useasianbreakrules/> <w:dontgrowautofit/> <w:splitpgbreakandparamark/> <w:dontvertaligncellwithsp/> <w:dontbreakconstrainedforcedtables/> <w:dontvertalignintxbx/> <w:word11kerningpairs/> <w:cachedcolbalance/> </w:Compatibility> <w:browserlevel>MicrosoftInternetExplorer4</w:BrowserLevel> <m:mathpr> <m:mathfont val="Cambria Math"> <m:brkbin val="before"> <m:brkbinsub val="--"> <m:smallfrac val="off"> <m:dispdef/> <m:lmargin val="0"> <m:rmargin val="0"> <m:defjc val="centerGroup"> <m:wrapindent val="1440"> <m:intlim val="subSup"> <m:narylim val="undOvr"> </m:mathPr></w:WordDocument> </xml><![endif]--><!--[if gte mso 9]><xml> <w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"> <w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"> <w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"> <w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"> <w:lsdexception locked="false" priority="39" name="toc 1"> <w:lsdexception locked="false" priority="39" name="toc 2"> <w:lsdexception locked="false" priority="39" name="toc 3"> <w:lsdexception locked="false" priority="39" name="toc 4"> <w:lsdexception locked="false" priority="39" name="toc 5"> <w:lsdexception locked="false" priority="39" name="toc 6"> <w:lsdexception locked="false" priority="39" name="toc 7"> <w:lsdexception locked="false" priority="39" name="toc 8"> <w:lsdexception locked="false" priority="39" name="toc 9"> <w:lsdexception locked="false" priority="35" qformat="true" name="caption"> <w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"> <w:lsdexception locked="false" priority="1" name="Default Paragraph Font"> <w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"> <w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"> <w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"> <w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"> <w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"> <w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"> <w:lsdexception locked="false" unhidewhenused="false" name="Revision"> <w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"> <w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"> <w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"> <w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"> <w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"> <w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"> <w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"> <w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"> <w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"> <w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"> <w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"> <w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"> <w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"> <w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"> <w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"> <w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"> <w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"> <w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"> <w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"> <w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"> <w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"> <w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"> <w:lsdexception locked="false" priority="37" name="Bibliography"> <w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"> </w:LatentStyles> </xml><![endif]--><style> <!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin-top:0in; margin-right:0in; margin-bottom:10.0pt; margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} .MsoPapDefault {mso-style-type:export-only; margin-bottom:10.0pt; line-height:115%;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style><!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} </style> <![endif]-->private void LoadImage(string filePath)
<br /> {
<br /> using (FileStream reader = new FileStream(filePath, FileMode.Open))
<br /> {
<br /> byte[] data = new byte[reader.Length];
<br /> reader.Read(data, 0, (int)reader.Length);
<br /> using (MemoryStream memory = new MemoryStream(data))
<br /> {
<br /> pictureBox1.Image = new Bitmap(memory);
<br /> pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
<br /> }
<br /> }
<br /> }
<br />
<br />Thank you
<br />
<br />RRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com5tag:blogger.com,1999:blog-5320350318741133625.post-52893056299775096092008-07-15T20:33:00.000-07:002008-07-15T20:36:43.803-07:00Transparent Label in .NET Compact frameworkHi Guys,<br /><br />I seen in MS forums lof of guys, asking how to make transparent label.<br />it's pretty simple, when we use the Graphics object in .NET CF.<br /><br />Here complete code for create transparent label.<br /><br /><span><p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#0000ff;">private</span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#0000ff;">void</span><span style="font-size:85%;"> DrawLabel (</span><span style="font-size:85%;color:#2b91af;">Label</span><span style="font-size:85%;"> label, </span><span style="font-size:85%;color:#2b91af;">Graphics</span><span style="font-size:85%;"> gfx)</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">{</span></span></p> <blockquote dir="ltr" style="margin-right: 0px;"> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#0000ff;">if</span><span style="font-size:85%;"> (label.TextAlign == </span><span style="font-size:85%;color:#2b91af;">ContentAlignment</span><span style="font-size:85%;">.TopLeft)</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">{</span></span></p> <blockquote dir="ltr" style="margin-right: 0px;"> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">gfx.DrawString(label.Text, label.Font, </span><span style="font-size:85%;color:#0000ff;">new</span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#2b91af;">SolidBrush</span><span style="font-size:85%;">(label.ForeColor), label.Bounds);</span></span></p></blockquote> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">}</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#0000ff;">else</span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#0000ff;">if</span><span style="font-size:85%;"> (label.TextAlign == </span><span style="font-size:85%;color:#2b91af;">ContentAlignment</span><span style="font-size:85%;">.TopCenter)</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">{</span></span></p> <blockquote dir="ltr" style="margin-right: 0px;"> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#2b91af;">SizeF</span><span style="font-size:85%;"> size = gfx.MeasureString(label.Text, label.Font);</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#0000ff;">float</span><span style="font-size:85%;"> left = ((</span><span style="font-size:85%;color:#0000ff;">float</span><span style="font-size:85%;">) </span><span style="font-size:85%;color:#0000ff;">this</span><span style="font-size:85%;">.Width + label.Left) / 2 - size.Width / 2;</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#2b91af;">RectangleF</span><span style="font-size:85%;"> rect = </span><span style="font-size:85%;color:#0000ff;">new</span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#2b91af;">RectangleF</span><span style="font-size:85%;">(left, (</span><span style="font-size:85%;color:#0000ff;">float</span><span style="font-size:85%;">) label.Top, size.Width, label.Height);</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">gfx.DrawString(label.Text, label.Font, </span><span style="font-size:85%;color:#0000ff;">new</span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#2b91af;">SolidBrush</span><span style="font-size:85%;">(label.ForeColor), rect);</span></span></p></blockquote> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">}</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#0000ff;">else</span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#008000;">//is aligned at TopRight</span></span></p><span style="font-size:85%;color:#808080;"><span style="font-size:85%;"> </span></span><p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">{</span></span></p> <blockquote dir="ltr" style="margin-right: 0px;"> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#2b91af;">SizeF</span><span style="font-size:85%;"> size = gfx.MeasureString(label.Text, label.Font);</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#0000ff;">float</span><span style="font-size:85%;"> left = (</span><span style="font-size:85%;color:#0000ff;">float</span><span style="font-size:85%;">) label.Width - size.Width + label.Left;</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;color:#2b91af;">RectangleF</span><span style="font-size:85%;"> rect = </span><span style="font-size:85%;color:#0000ff;">new</span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#2b91af;">RectangleF</span><span style="font-size:85%;">(left, (</span><span style="font-size:85%;color:#0000ff;">float</span><span style="font-size:85%;">) label.Top, size.Width, label.Height);</span></span></p> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">gfx.DrawString(label.Text, label.Font, </span><span style="font-size:85%;color:#0000ff;">new</span><span style="font-size:85%;"> </span><span style="font-size:85%;color:#2b91af;">SolidBrush</span><span style="font-size:85%;">(label.ForeColor), rect);</span></span></p></blockquote> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">}</span></span></p></blockquote> <p align="left"><span style="font-size:85%;color:#808080;"><span style="font-size:85%;">}</span></span></p><span style="font-size:85%;color:#808080;"><br />Thank you<br /></span></span>RRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com1tag:blogger.com,1999:blog-5320350318741133625.post-44136635325421478182008-07-15T08:29:00.000-07:002008-07-15T08:31:53.333-07:00How to find string within ComboBox in .NET CFHi<br />The comapct framework haven't method for find a string within combobox, but native code have support. So little P/Invoke and get tht features to .NET CF<br /><br />Here code for you.<br /><br /><span style="font-size:85%;"><span style="font-family: verdana;"> <span style="color: rgb(102, 102, 102);">public const int CB_FINDSTRINGEXACT = 0x0158;</span></span><br /><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> [DllImport("coredll.dll")]</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> internal static extern int SendMessage(IntPtr hWnd, int msg, int wParam, string lParam);</span><br /><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> private void FindStringExact(string find)</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> {</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> int m = SendMessage(comboBox1.Handle, CB_FINDSTRINGEXACT, 0, find + "\0");</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> if (m > 0)</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> {</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> MessageBox.Show(find);</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> }</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> else</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> {</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> MessageBox.Show("no");</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> }</span><br /><span style="font-family: verdana; color: rgb(102, 102, 102);"> }</span></span><br /><br />Thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-59371984753141675562008-07-15T07:41:00.000-07:002008-07-15T07:48:38.957-07:00How to create Action Lable in .Net compact framework.Hi Guys,<br /><br />Now i'm back in my blog, so i have plan post some cool stuff in my blog every day.<br /><br />According that, today i will post a code for , how to create Action Lable in .NETCF.<br /><br />It's pretty simple, Because of we dont need play with P/Invoke. but we want to play with GDI.<br /><br />Because of i want to create a graphical objects,<br /><br />Here complete code for you.<br /><br /><br />using System;<br />using System.Windows.Forms;<br />using System.Drawing;<br /><br />namespace RaveSoftBlog<br />{<br /> /// <summary><br /> /// Arrow label button control.<br /> /// </summary><br /> public class ActionLabel : Control<br /> {<br /> class Const<br /> {<br /> public static Color DisableColor = Color.FromArgb(150,150,80);<br /> public static Color PushedColor = Color.FromArgb(160,100,0);<br /> public static Color ForeColor = Color.FromArgb(90,90,45);<br /> public static Color BulletColor = Color.FromArgb(180,180,110);<br /> public const string FontName = "Arial";<br /> public const int FontSize = 10;<br /> public const int BulletSize = 8;<br /> }<br /> <br /> // internal fields<br /> bool m_pushed;<br /> Rectangle m_rcHitArea;<br /> Point[] m_bulletPts;<br /> <br /> // gdi objects<br /> Bitmap m_bmp;<br /> Font m_font;<br /> Pen m_penPushed, m_penFore, m_penDisabled;<br /> Brush m_brushPushed, m_brushFore, m_brushDisabled;<br /><br /> // ctor<br /> public ActionLabelControl()<br /> {<br /> // colors<br /> this.ForeColor = Const.ForeColor;<br /> <br /> // gdi objects<br /> CreateGdiObjects();<br /> }<br /><br /> protected override void OnPaint(PaintEventArgs e)<br /> {<br /> // draw to memory bitmap<br /> CreateMemoryBitmap(e.Graphics);<br /> Graphics g = Graphics.FromImage(m_bmp);<br /> DrawLabel(g);<br /> <br /> // blit memory bitmap to screen<br /> e.Graphics.DrawImage(m_bmp, 0, 0);<br /> }<br /><br /> protected override void OnPaintBackground(PaintEventArgs e)<br /> {<br /> // don't pass to base since we paint everything, avoid flashing<br /> }<br /> <br /> protected override void OnEnabledChanged(EventArgs e)<br /> {<br /> // redraw when enabled state changes<br /> Invalidate();<br /> }<br /><br /> // draw label and arrow<br /> private void DrawLabel(Graphics g)<br /> {<br /> // background<br /> g.Clear(Parent.BackColor);<br /> <br /> // determine what pen and brush to use<br /> Pen pen = m_pushed ? m_penPushed :<br /> (this.Enabled ? m_penFore : m_penDisabled);<br /><br /> Brush brush = m_pushed ? m_brushPushed :<br /> (this.Enabled ? m_brushFore : m_brushDisabled);<br /><br /> // draw solid arrow if enabled<br /> if (this.Enabled)<br /> g.FillPolygon(brush, m_bulletPts);<br /><br /> g.DrawPolygon(pen, m_bulletPts);<br /><br /> // label text<br /> Size textSize = g.MeasureString(Text, m_font).ToSize();<br /> g.DrawString(Text, m_font, brush,<br /> Const.BulletSize+8, (this.Height - textSize.Height)/2);<br /> }<br /> <br /> protected override void OnMouseDown (MouseEventArgs e)<br /> {<br /> base.OnMouseDown(e);<br /> this.Capture = true;<br /><br /> // see if clicked on label text or arrow<br /> if (m_rcHitArea.Contains(e.X, e.Y))<br /> {<br /> m_pushed = true;<br /> Invalidate();<br /> }<br /> }<br /><br /> protected override void OnMouseUp (MouseEventArgs e)<br /> {<br /> base.OnMouseUp(e);<br /> this.Capture = false;<br /> m_pushed = false;<br /> Invalidate();<br /> }<br /> <br /> protected override void OnClick(EventArgs e)<br /> {<br /> if (m_pushed)<br /> base.OnClick(e);<br /> }<br /><br /> private void CreateGdiObjects()<br /> {<br /> // gdi objects<br /> m_font = new Font(Const.FontName, Const.FontSize, FontStyle.Bold);<br /> m_penPushed = new Pen(Const.PushedColor);<br /> m_penFore = new Pen(this.ForeColor);<br /> m_penDisabled = new Pen(Const.DisableColor);<br /> m_brushPushed = new SolidBrush(Const.PushedColor);<br /> m_brushFore = new SolidBrush(this.ForeColor);<br /> m_brushDisabled = new SolidBrush(Const.DisableColor);<br /> }<br /> <br /> private void CreateMemoryBitmap(Graphics g)<br /> {<br /> // see if need to create gdi objects<br /> if (m_bmp == null || m_bmp.Width != this.Width || m_bmp.Height != this.Height)<br /> {<br /> // memory bitmap<br /> m_bmp = new Bitmap(this.Width, this.Height);<br /> <br /> // bullet points<br /> int halfHeight = this.Height/2;<br /> m_bulletPts = new Point[3];<br /> m_bulletPts[0] = new Point(0, halfHeight-(Const.BulletSize/2));<br /> m_bulletPts[1] = new Point(Const.BulletSize, halfHeight);<br /> m_bulletPts[2] = new Point(0, halfHeight+(Const.BulletSize/2));<br /><br /> // hit area<br /> Size textSize = g.MeasureString(Text, m_font).ToSize();<br /> m_rcHitArea = new Rectangle(0,<br /> (this.Height - textSize.Height)/2,<br /> textSize.Width + Const.BulletSize + 8,<br /> textSize.Height);<br /> }<br /> }<br /> }<br />}<br /><br />Thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-62623865070539309052008-07-15T07:38:00.000-07:002008-07-15T07:41:09.445-07:00System Center Mobile deviceHi Guys,<br /><br />Another good news, the Microsoft lounge the new blog for SCMD.<br /><br />i hope it's help to mobile related developer with MS.<br /><br />http://blogs.technet.com/scmdm/<br /><br />Thank youRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-81277751013237195332008-01-09T00:39:00.001-08:002008-01-09T00:39:56.500-08:00Use the Sync Framework with C#<p class="MsoNormal"><span style="" lang="EN-AU">Hi Guys<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">Micro soft introduce new framework for<span style=""> </span>all type sync. This framework<span style=""> </span>have<span style=""> </span>varity type of the specify sync operation with database or filesystem. <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">List of those are,<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">1.ADO.Net<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">2.Common(File System)<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">You can downlaod SyncFramework from bellow url<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=35E8F16E-AAA4-4919-8B3C-1CE4EA1F6552&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=35E8F16E-AAA4-4919-8B3C-1CE4EA1F6552&displaylang=en</a><o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">The Sync framework have managed class libraries. So we can code with C# or other your desired language (MS).<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">After download and installed , create a new Project with C# or your desired language.<o:p></o:p></span></p> <p class="MsoNormal"><b style=""><span style="" lang="EN-AU">I had create console application with C#<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="" lang="EN-AU">Afte you must add References Microsoft <span style=""> </span></span><code><span style="font-size: 10pt; line-height: 115%;">Synchronization</span></code><span style="" lang="EN-AU"><o:p></o:p></span></p> <p class="MsoNormal"><code><span style="font-size: 10pt; line-height: 115%;">using System;</span></code><span style="font-size: 10pt; line-height: 115%; font-family: "Courier New";"><br /><code><span style=""> using System.IO;</span></code><br /><code><span style=""> using Microsoft.Synchronization;</span></code><br /><code><span style=""> using Microsoft.Synchronization.Files;</span></code><br /><br /><code><span style=""> public class FileSyncProviderSample</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> public static void Main( string [] args)</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> if (args.Length <></code><br /><code><span style=""> string .IsNullOrEmpty(args[0]) || string .IsNullOrEmpty(args[1]) ||</span></code><br /><code><span style=""> ! Directory .Exists(args[0]) || ! Directory .Exists(args[1]))</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> Console .WriteLine(</span></code><br /><code><span style=""> "Usage: FileSyncSample [valid directory path 1] [valid directory path 2]" );</span></code><br /><code><span style=""> return ;</span></code><br /><code><span style=""> }</span></code><br /><br /><code><span style=""> string replica1RootPath = args[0];</span></code><br /><code><span style=""> string replica2RootPath = args[1];</span></code><br /><code><span style=""> string idFileName = "filesync.id" ;</span></code><br /><br /><code><span style=""> SyncId replica1Id = GetReplicaId( Path .Combine(args[0], idFileName));</span></code><br /><code><span style=""> SyncId replica2Id = GetReplicaId( Path .Combine(args[1], idFileName));</span></code><br /><br /><code><span style=""> try</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> // Set options for the sync operation</span></code><br /><code><span style=""> FileSyncOptions options = FileSyncOptions.ExplicitDetectChanges |</span></code><br /><code><span style=""> FileSyncOptions.RecycleDeletes | FileSyncOptions.RecycleOverwrites;</span></code><br /><br /><code><span style=""> FileSyncScopeFilter filter = new FileSyncScopeFilter();</span></code><br /><code><span style=""> filter.FileNameExcludes.Add(idFileName); // Exclude the id file</span></code><br /><br /><code><span style=""> // Explicitly detect changes on both replicas upfront, to avoid two change</span></code><br /><code><span style=""> // detection passes for the two-way sync</span></code><br /><code><span style=""> DetectChangesOnFileSystemReplica(</span></code><br /><code><span style=""> replica1Id, replica1RootPath, filter, options);</span></code><br /><code><span style=""> DetectChangesOnFileSystemReplica(</span></code><br /><code><span style=""> replica2Id, replica2RootPath, filter, options);</span></code><br /><br /><code><span style=""> // Sync in both directions</span></code><br /><code><span style=""> SyncFileSystemReplicasOneWay(replica1Id, replica2Id,</span></code><br /><code><span style=""> replica1RootPath, replica2RootPath, filter, options);</span></code><br /><code><span style=""> SyncFileSystemReplicasOneWay(replica2Id, replica1Id,</span></code><br /><code><span style=""> replica2RootPath, replica1RootPath, filter, options);</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> catch ( Exception e)</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> Console .WriteLine( "\nException from File System Provider:\n" + e.ToString());</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> }</span></code><br /><br /><code><span style=""> public static void DetectChangesOnFileSystemReplica(</span></code><br /><code><span style=""> SyncId replicaId, string replicaRootPath,</span></code><br /><code><span style=""> FileSyncScopeFilter filter, FileSyncOptions options)</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> FileSyncProvider provider = null ;</span></code><br /><br /><code><span style=""> try</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> provider = new FileSyncProvider(replicaId, replicaRootPath, filter, options);</span></code><br /><code><span style=""> provider.DetectChanges();</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> finally</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> // Release resources</span></code><br /><code><span style=""> if (provider != null )</span></code><br /><code><span style=""> provider.Dispose();</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> }</span></code><br /><br /><code><span style=""> public static void SyncFileSystemReplicasOneWay(</span></code><br /><code><span style=""> SyncId sourceReplicaId, SyncId destinationReplicaId,</span></code><br /><code><span style=""> string sourceReplicaRootPath, string destinationReplicaRootPath,</span></code><br /><code><span style=""> FileSyncScopeFilter filter, FileSyncOptions options)</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> FileSyncProvider sourceProvider = null ;</span></code><br /><code><span style=""> FileSyncProvider destinationProvider = null ;</span></code><br /><br /><code><span style=""> try</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> sourceProvider = new FileSyncProvider(</span></code><br /><code><span style=""> sourceReplicaId, sourceReplicaRootPath, filter, options);</span></code><br /><code><span style=""> destinationProvider = new FileSyncProvider(</span></code><br /><code><span style=""> destinationReplicaId, destinationReplicaRootPath, filter, options);</span></code><br /><br /><code><span style=""> destinationProvider.AppliedChange +=</span></code><br /><code><span style=""> new EventHandler <appliedchangeeventargs>(OnAppliedChange);</span></code><br /><code><span style=""> destinationProvider.SkippedChange +=</span></code><br /><code><span style=""> new EventHandler <skippedchangeeventargs>(OnSkippedChange);</span></code><br /><br /><code><span style=""> SyncAgent agent = new SyncAgent();</span></code><br /><code><span style=""> agent.LocalProvider = sourceProvider;</span></code><br /><code><span style=""> agent.RemoteProvider = destinationProvider;</span></code><br /><code><span style=""> agent.Direction = SyncDirection.Upload; // Sync source to destination</span></code><br /><br /><code><span style=""> Console .WriteLine( "Synchronizing changes to replica: " +</span></code><br /><code><span style=""> destinationProvider.RootDirectoryPath);</span></code><br /><code><span style=""> agent.Synchronize();</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> finally</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> // Release resources</span></code><br /><code><span style=""> if (sourceProvider != null ) sourceProvider.Dispose();</span></code><br /><code><span style=""> if (destinationProvider != null ) destinationProvider.Dispose();</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> }</span></code><br /><br /><code><span style=""> public static void OnAppliedChange( object sender, AppliedChangeEventArgs args)</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> switch (args.ChangeType)</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> case ChangeType.Create:</span></code><br /><code><span style=""> Console .WriteLine( "-- Applied CREATE for file " + args.NewFilePath);</span></code><br /><code><span style=""> break ;</span></code><br /><code><span style=""> case ChangeType.Delete:</span></code><br /><code><span style=""> Console .WriteLine( "-- Applied DELETE for file " + args.OldFilePath);</span></code><br /><code><span style=""> break ;</span></code><br /><code><span style=""> case ChangeType.Overwrite:</span></code><br /><code><span style=""> Console .WriteLine( "-- Applied OVERWRITE for file " + args.OldFilePath);</span></code><br /><code><span style=""> break ;</span></code><br /><code><span style=""> case ChangeType.Rename:</span></code><br /><code><span style=""> Console .WriteLine( "-- Applied RENAME for file " + args.OldFilePath +</span></code><br /><code><span style=""> " as " + args.NewFilePath);</span></code><br /><code><span style=""> break ;</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> }</span></code><br /><br /><code><span style=""> public static void OnSkippedChange( object sender, SkippedChangeEventArgs args)</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> Console .WriteLine( "-- Skipped applying " + args.ChangeType.ToString().ToUpper()</span></code><br /><code><span style=""> + " for " + (! string .IsNullOrEmpty(args.CurrentFilePath) ?</span></code><br /><code><span style=""> args.CurrentFilePath : args.NewFilePath) + " due to error" );</span></code><br /><br /><code><span style=""> if (args.Exception != null )</span></code><br /><code><span style=""> Console .WriteLine( " [" + args.Exception.Message + "]" );</span></code><br /><code><span style=""> }</span></code><br /><br /><code><span style=""> public static SyncId GetReplicaId( string idFilePath)</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> SyncId replicaId = null ;</span></code><br /><br /><code><span style=""> if ( File .Exists(idFilePath))</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> using ( StreamReader sr = File .OpenText(idFilePath))</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> string strGuid = sr.ReadLine();</span></code><br /><code><span style=""> if (! string .IsNullOrEmpty(strGuid))</span></code><br /><code><span style=""> replicaId = new SyncId( new Guid (strGuid));</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> }</span></code><br /><br /><code><span style=""> if (replicaId == null )</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> using ( FileStream idFile = File .Open(</span></code><br /><code><span style=""> idFilePath, FileMode .OpenOrCreate, FileAccess .ReadWrite))</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> using ( StreamWriter sw = new StreamWriter (idFile))</span></code><br /><code><span style=""> {</span></code><br /><code><span style=""> replicaId = new SyncId( Guid .NewGuid());</span></code><br /><code><span style=""> sw.WriteLine(replicaId.GetGuidId().ToString( "D" ));</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> }</span></code><br /><br /><code><span style=""> return replicaId;</span></code><br /><code><span style=""> }</span></code><br /><code><span style=""> }</span></code></span><span style="" lang="EN-AU"><o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">basically sync framework work GUID as references. Because of Sync is time depend operation,so we must need a unique id for identification our file/DB is changed , removed and etc.<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"><o:p> </o:p></span></p> <p class="MsoNormal"><b style=""><span style="" lang="EN-AU">Con<o:p></o:p></span></b></p> <p class="MsoNormal"><span style="" lang="EN-AU">The SyncFramework<span style=""> </span>had<span style=""> </span>greate feature for sync operation to all types of operation. <o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">You can use the Sync framework for Database Sync , File System Sync,And <span style=""> </span>Mobile decvice File Sync.<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU">More from<o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"><a href="http://msdn2.microsoft.com/en-us/sync/default.aspx">http://msdn2.microsoft.com/en-us/sync/default.aspx</a><o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"><a href="http://msdn2.microsoft.com/en-us/sync/bb887623.aspx">http://msdn2.microsoft.com/en-us/sync/bb887623.aspx</a><o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"><o:p> </o:p></span></p> <p class="MsoNormal"><i><span style="font-size: 10pt; line-height: 115%; color: rgb(0, 102, 0);">Best Regards<br />RRave</span></i><br /><i><span style="font-size: 10pt; line-height: 115%; color: rgb(0, 102, 0);"><u1:p>MCTS/MCPD</u1:p></span></i><span style="" lang="EN-AU"><o:p></o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"><o:p> </o:p></span></p> <p class="MsoNormal"><span style="" lang="EN-AU"><o:p> </o:p></span></p>RRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com1tag:blogger.com,1999:blog-5320350318741133625.post-88399861304034861512007-12-27T21:51:00.000-08:002007-12-27T22:19:59.919-08:00Access Assembly file and get Product informations<p class="MsoNormal">Hi Guys</p> <p class="MsoNormal">We have good features in the .net based on the application version and customizations. Basically dot net provide unique assembly file for the common setting within the Projects. And we can play with that file within code as well. How I can say that? The dot net give few attributes based on the assembly manipulations. Let say we want to know the current version of the Product, so we want to access assembly file and get answer from that file. Since when we try access that product version attribute in the assembly file, we must use the AssemblyVersionAttribute attribute.</p> <p class="MsoNormal">And lot’s customization attribute exist in the .net class library based on the assembly file.</p> <p class="MsoNormal">List of commonly using attributes.</p> <p class="MsoListParagraphCxSpFirst" style="text-indent: -0.25in;"><!--[if !supportLists]--><span style="line-height: 115%;"><span style="">1.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: rgb(49, 163, 196);">1.AssemblyTitleAttribute<o:p></o:p></span></p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -0.25in;"><!--[if !supportLists]--><span style=""><span style="">2.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: rgb(49, 163, 196);">2.AssemblyCompanyAttribute</span></p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -0.25in;"><!--[if !supportLists]--><span style=""><span style="">3.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: rgb(49, 163, 196);">3.AssemblyVersionAttribute</span></p> <p class="MsoListParagraphCxSpMiddle" style="text-indent: -0.25in;"><!--[if !supportLists]--><span style=""><span style="">4.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: rgb(49, 163, 196);">4.AssemblyProductAttribute</span></p> <p class="MsoListParagraphCxSpLast" style="text-indent: -0.25in;"><!--[if !supportLists]--><span style="line-height: 115%;"><span style="">5.5<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> 5.</span></span></span><span style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: rgb(49, 163, 196);">AssemblyCopyrightAttribute<o:p></o:p></span></p><span style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: rgb(49, 163, 196);"></span><span style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: rgb(49, 163, 196);"><o:p></o:p></span> <p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span style=""><span style="">6.<span style="font-family: "Times New Roman"; font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: rgb(49, 163, 196);">6.AssemblyDescriptionAttribute</span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.25in;">Now see, somebody can know how use those attribute with our coding .somebody may be can’t know. This article provides simple class with commonly using attribute, and gets information from the assembly about the product.</p> <p class="MsoNormal" style="margin-left: 0.25in;">Let’s see the class.</p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New"; color: blue;">using</span><span style="font-size: 10pt; font-family: "Courier New";"> System;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New"; color: blue;">using</span><span style="font-size: 10pt; font-family: "Courier New";"> System<b><span style="color: red;">.</span></b>Collections<b><span style="color: red;">.</span></b>Generic;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New"; color: blue;">using</span><span style="font-size: 10pt; font-family: "Courier New";"> System<b><span style="color: red;">.</span></b>Text;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New"; color: blue;">using</span><span style="font-size: 10pt; font-family: "Courier New";"> System<b><span style="color: red;">.</span></b>Reflection;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New"; color: blue;">namespace</span><span style="font-size: 10pt; font-family: "Courier New";"> AccessAssembly<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";">{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">public</span> <span style="color: blue;">class</span> <span style="color: rgb(49, 163, 196);">ApplicationDetails<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">static</span> <span style="color: blue;">string</span> companyName <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"><summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> Get the name of the system provider name from the assembly<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"></summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">string</span> CompanyName<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">get<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: rgb(49, 163, 196);">Assembly</span> assembly <b><span style="color: red;">=</span></b> System<b><span style="color: red;">.</span></b>Reflection<b><span style="color: red;">.</span></b><span style="color: rgb(49, 163, 196);">Assembly</span><b><span style="color: red;">.</span></b>GetEntryAssembly();<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span><span style="color: blue;">if</span> (assembly <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">object</span>[] customAttributes <b><span style="color: red;">=</span></b> assembly<b><span style="color: red;">.</span></b>GetCustomAttributes(<span style="color: blue;">typeof</span>(<span style="color: rgb(49, 163, 196);">AssemblyCompanyAttribute</span>), <span style="color: blue;">false</span>);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> ((customAttributes <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>) <b><span style="color: red;">&&</span></b> (customAttributes<b><span style="color: red;">.</span></b>Length <b><span style="color: red;">></span></b> 0))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>companyName <b><span style="color: red;">=</span></b> ((<span style="color: rgb(49, 163, 196);">AssemblyCompanyAttribute</span>)customAttributes[0])<b><span style="color: red;">.</span></b>Company;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (<span style="color: blue;">string</span><b><span style="color: red;">.</span></b>IsNullOrEmpty(companyName))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>companyName <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">return</span> companyName;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">static</span> <span style="color: blue;">string</span> productVersion <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"><summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> Get System version from the assembly<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"></summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">string</span> ProductVersion<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">get<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: rgb(49, 163, 196);">Assembly</span> assembly <b><span style="color: red;">=</span></b> System<b><span style="color: red;">.</span></b>Reflection<b><span style="color: red;">.</span></b><span style="color: rgb(49, 163, 196);">Assembly</span><b><span style="color: red;">.</span></b>GetEntryAssembly();<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (assembly <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">object</span>[] customAttributes <b><span style="color: red;">=</span></b> assembly<b><span style="color: red;">.</span></b>GetCustomAttributes(<span style="color: blue;">typeof</span>(<span style="color: rgb(49, 163, 196);">AssemblyVersionAttribute</span>), <span style="color: blue;">false</span>);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> ((customAttributes <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>) <b><span style="color: red;">&&</span></b> (customAttributes<b><span style="color: red;">.</span></b>Length <b><span style="color: red;">></span></b> 0))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productVersion <b><span style="color: red;">=</span></b> ((<span style="color: rgb(49, 163, 196);">AssemblyVersionAttribute</span>)customAttributes[0])<b><span style="color: red;">.</span></b>Version;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (<span style="color: blue;">string</span><b><span style="color: red;">.</span></b>IsNullOrEmpty(productVersion))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productVersion <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">return</span> productVersion;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">static</span> <span style="color: blue;">string</span> productName <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"><summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> Get the name of the System from the assembly<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"></summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">string</span> ProductName<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">get<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: rgb(49, 163, 196);">Assembly</span> assembly <b><span style="color: red;">=</span></b> System<b><span style="color: red;">.</span></b>Reflection<b><span style="color: red;">.</span></b><span style="color: rgb(49, 163, 196);">Assembly</span><b><span style="color: red;">.</span></b>GetEntryAssembly();<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (assembly <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">object</span>[] customAttributes <b><span style="color: red;">=</span></b> assembly<b><span style="color: red;">.</span></b>GetCustomAttributes(<span style="color: blue;">typeof</span>(<span style="color: rgb(49, 163, 196);">AssemblyProductAttribute</span>), <span style="color: blue;">false</span>);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> ((customAttributes <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>) <b><span style="color: red;">&&</span></b> (customAttributes<b><span style="color: red;">.</span></b>Length <b><span style="color: red;">></span></b> 0))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productName <b><span style="color: red;">=</span></b> ((<span style="color: rgb(49, 163, 196);">AssemblyProductAttribute</span>)customAttributes[0])<b><span style="color: red;">.</span></b>Product;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (<span style="color: blue;">string</span><b><span style="color: red;">.</span></b>IsNullOrEmpty(productName))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productName <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">return</span> productName;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">static</span> <span style="color: blue;">string</span> copyRightsDetail <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"><summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> Get the copyRights details from the assembly<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"></summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">string</span> CopyRightsDetail<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">get<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: rgb(49, 163, 196);">Assembly</span> assembly <b><span style="color: red;">=</span></b> System<b><span style="color: red;">.</span></b>Reflection<b><span style="color: red;">.</span></b><span style="color: rgb(49, 163, 196);">Assembly</span><b><span style="color: red;">.</span></b>GetEntryAssembly();<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (assembly <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">object</span>[] customAttributes <b><span style="color: red;">=</span></b> assembly<b><span style="color: red;">.</span></b>GetCustomAttributes(<span style="color: blue;">typeof</span>(<span style="color: rgb(49, 163, 196);">AssemblyCopyrightAttribute</span>), <span style="color: blue;">false</span>);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> ((customAttributes <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>) <b><span style="color: red;">&&</span></b> (customAttributes<b><span style="color: red;">.</span></b>Length <b><span style="color: red;">></span></b> 0))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>copyRightsDetail <b><span style="color: red;">=</span></b> ((<span style="color: rgb(49, 163, 196);">AssemblyCopyrightAttribute</span>)customAttributes[0])<b><span style="color: red;">.</span></b>Copyright;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (<span style="color: blue;">string</span><b><span style="color: red;">.</span></b>IsNullOrEmpty(copyRightsDetail))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>copyRightsDetail <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">return</span> copyRightsDetail;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">static</span> <span style="color: blue;">string</span> productTitle <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"><summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> Get the Product tile from the assembly<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"></summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">string</span> ProductTitle<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">get<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: rgb(49, 163, 196);">Assembly</span> assembly <b><span style="color: red;">=</span></b> System<b><span style="color: red;">.</span></b>Reflection<b><span style="color: red;">.</span></b><span style="color: rgb(49, 163, 196);">Assembly</span><b><span style="color: red;">.</span></b>GetEntryAssembly();<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (assembly <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">object</span>[] customAttributes <b><span style="color: red;">=</span></b> assembly<b><span style="color: red;">.</span></b>GetCustomAttributes(<span style="color: blue;">typeof</span>(<span style="color: rgb(49, 163, 196);">AssemblyTitleAttribute</span>), <span style="color: blue;">false</span>);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> ((customAttributes <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>) <b><span style="color: red;">&&</span></b> (customAttributes<b><span style="color: red;">.</span></b>Length <b><span style="color: red;">></span></b> 0))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productTitle <b><span style="color: red;">=</span></b> ((<span style="color: rgb(49, 163, 196);">AssemblyTitleAttribute</span>)customAttributes[0])<b><span style="color: red;">.</span></b>Title;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (<span style="color: blue;">string</span><b><span style="color: red;">.</span></b>IsNullOrEmpty(productTitle))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productTitle <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">return</span> productTitle;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">static</span> <span style="color: blue;">string</span> productDescription <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"><summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> Get the description of the product from the assembly<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: gray;">///</span><span style="color: green;"> </span><span style="color: gray;"></summary><o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">string</span> ProductDescription<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">get<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: rgb(49, 163, 196);">Assembly</span> assembly <b><span style="color: red;">=</span></b> System<b><span style="color: red;">.</span></b>Reflection<b><span style="color: red;">.</span></b><span style="color: rgb(49, 163, 196);">Assembly</span><b><span style="color: red;">.</span></b>GetEntryAssembly();<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (assembly <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">object</span>[] customAttributes <b><span style="color: red;">=</span></b> assembly<b><span style="color: red;">.</span></b>GetCustomAttributes(<span style="color: blue;">typeof</span>(<span style="color: rgb(49, 163, 196);">AssemblyDescriptionAttribute</span>), <span style="color: blue;">false</span>);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> ((customAttributes <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>) <b><span style="color: red;">&&</span></b> (customAttributes<b><span style="color: red;">.</span></b>Length <b><span style="color: red;">></span></b> 0))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productDescription <b><span style="color: red;">=</span></b> ((<span style="color: rgb(49, 163, 196);">AssemblyDescriptionAttribute</span>)customAttributes[0])<b><span style="color: red;">.</span></b>Description;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (<span style="color: blue;">string</span><b><span style="color: red;">.</span></b>IsNullOrEmpty(productDescription))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productDescription <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">return</span> productDescription;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";">}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.25in;">Let see simple explanation get product description from the assembly file</p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">string</span> ProductDescription<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">get<o:p></o:p></span></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";">//get the entry assebly file for the product<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: rgb(49, 163, 196);">Assembly</span> assembly <b><span style="color: red;">=</span></b> System<b><span style="color: red;">.</span></b>Reflection<b><span style="color: red;">.</span></b><span style="color: rgb(49, 163, 196);">Assembly</span><b><span style="color: red;">.</span></b>GetEntryAssembly();<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (assembly <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>)<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";">//now get the customattribute for the <span style="color: rgb(49, 163, 196);">AssemblyDescriptionAttribute</span><o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">object</span>[] customAttributes <b><span style="color: red;">=</span></b> assembly<b><span style="color: red;">.</span></b>GetCustomAttributes(<span style="color: blue;">typeof</span>(<span style="color: rgb(49, 163, 196);">AssemblyDescriptionAttribute</span>), <span style="color: blue;">false</span>);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> ((customAttributes <b><span style="color: red;">!=</span></b> <span style="color: blue;">null</span>) <b><span style="color: red;">&&</span></b> (customAttributes<b><span style="color: red;">.</span></b>Length <b><span style="color: red;">></span></b> 0))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productDescription <b><span style="color: red;">=</span></b> ((<span style="color: rgb(49, 163, 196);">AssemblyDescriptionAttribute</span>)customAttributes[0])<b><span style="color: red;">.</span></b>Description;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">if</span> (<span style="color: blue;">string</span><b><span style="color: red;">.</span></b>IsNullOrEmpty(productDescription))<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style=""> </span>{<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productDescription <b><span style="color: red;">=</span></b> <span style="color: blue;">string</span><b><span style="color: red;">.</span></b>Empty;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">return</span> productDescription;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><o:p> </o:p></span></p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>}<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.25in;">We want to get all custom attribute from the assembly file based on the<span style="font-size: 10pt; line-height: 115%; font-family: "Courier New"; color: rgb(49, 163, 196);"> AssemblyDescriptionAttribute</span> .</p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span><span style="color: blue;">object</span>[] customAttributes <b><span style="color: red;">=</span></b> assembly<b><span style="color: red;">.</span></b>GetCustomAttributes(<span style="color: blue;">typeof</span>(<span style="color: rgb(49, 163, 196);">AssemblyDescriptionAttribute</span>), <span style="color: blue;">false</span>);<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;">After access the first attribute in the collections, and get the value from that</p> <p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 10pt; font-family: "Courier New";"><span style=""> </span>productDescription <b><span style="color: red;">=</span></b> ((<span style="color: rgb(49, 163, 196);">AssemblyDescriptionAttribute</span>)customAttributes[0])<b><span style="color: red;">.</span></b>Description;<o:p></o:p></span></p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.25in;">That’s it. and enjoy<br /></p> <p class="MsoNormal" style="margin-left: 0.25in;"><b style="">Con<o:p></o:p></b></p> <p class="MsoNormal" style="margin-left: 0.25in;">The .net provides a good customization based on the assembly file. So please try access all other attributes in the assembly file and enjoy.</p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p> <p class="MsoNormal" style="margin-left: 0.25in;"><span style="font-style: italic; color: rgb(0, 102, 0);font-size:85%;" ><o:p> Best Regards<br />RRave</o:p></span><br /><o:p><span style="font-style: italic; color: rgb(0, 102, 0);font-size:85%;" >MCTS/MCPD</span><br /></o:p></p> <p class="MsoNormal" style="margin-left: 0.25in;"><o:p> </o:p></p>RRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com1tag:blogger.com,1999:blog-5320350318741133625.post-30509605689429146202007-12-17T21:12:00.001-08:002007-12-26T00:36:35.352-08:00CLS Attribute in DotNetHi Guys,<br /><br />The when i see the microsoft forums and other forums sites, many guys ask about CLSCompliant attribute in the class file or assembly. i have idea about that , and i will post here. It's not complicated, but have some conditions and etc...<br /><br />The conditions means, CLS-<span class="txt">Command Language Specification(.NET).When i can say .net is great framework for all guys.because of it's multi language supporting such as VB.NET,C++.NET,C#.NET,J# and etc....Somebody can ask how can support a framework to multi language? answer is that is th .NET FRAMEWORK.<br /><br />Come to point..<br />so when we try a code in any language with .net Framework, we must follow few rules , when we will apply </span>CLSCompliant attribute.<br /><br />a::The methods are not same. it;s we have one method call "GetUsers()", and we don't have a method like "GETUSERS()".<br /><br />b::Only properties and methods may be overloaded, Operators should not be overloaded.<br /><br />c::We must avoid unsignned datatype within the class file<br /><br />d::Publicly exposed members cannot start with an underscore ( _ )<br /><br />e::Unsafe types like pointers should not be used with public members. However they can be used with private members.<br /><br />f::Operators can't be overloaded<br /><br />g::Unsigned types should not be part of the public interface of the class.<br /><br /><br />we can apply <span class="txt"></span>CLSCompliant to<span style="font-size:85%;"> <span style="font-size:100%;"><span class="txt"><span style="font-family:Verdana;">assemblies, modules, types, and members.<br /><br /></span></span></span></span>Example::A(apply to class)<br />[CLSCompliant(true)]<br />public class Smp<br />{<br /><br />}<br /><span class="txt"><br /></span>Example::B(apply to assembly<br />using System;<br />[assembly:CLSCompliant(true)]<br /><br />Con....<br /><br />If you develop applications that conform to the CLS, your program will be interoperable with a wide range of .Net supported programming languages. Therefore, your application is likely to have a wider customer base than a non-CLS-compliant version of your application. You can make sure that the C# programs you develop are CLS compliant by using the CLSCompliantAttribute, which will cause the compiler to raise errors if the program is not CLS compliant.<br /><br /><span style="font-style: italic; font-weight: bold; color: rgb(0, 153, 0);">Best Regards</span><br /><span style="font-style: italic; font-weight: bold; color: rgb(0, 153, 0);">RRave</span><br /><span style="font-style: italic; font-weight: bold; color: rgb(0, 153, 0);">MCTS,MCPD</span><br /><br /><span class="txt"><span style="font-size:85%;"><span style="font-family:Verdana;"><span style="background-color: rgb(255, 255, 0);"></span></span></span></span>RRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-59739748753478316682007-11-20T21:38:00.000-08:002008-12-09T17:46:52.252-08:00Internet connection with Windows Mobile 5.0The windows mobile 5.0 SDK for pocket PC, had great dlls.<br />most popular one is the MicroSoft.Windows.Mobile.State.this is one have more than 100+ properties for Windows Mobile devices.You can download it's freely from here <a href="http://www.microsoft.com/downloads/details.aspx?familyid=83A52AF2-F524-4EC5-9155-717CBE5D25ED&displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=83A52AF2-F524-4EC5-9155-717CBE5D25ED&displaylang=en</a><br /><br />after installed SDK, create a new project with Windows Mobile 5.0 SDK Pocket PC, like this and give any name to your project.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9ocBnOK3eaME5SVpZ4RjK9FrdfPDSwuVItAi1skVS0ZTnNI_uYkwXar2T1nfr2BtMu4FdIfPgUmkQS-sPqlnSflC7W-DZw_u-0VEvQ1WHW1sAk9w5ZfuTSIWgAXRWfTUNb40Kk7uI5UIY/s1600-h/WM5.0_GPRS_1.jpg"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9ocBnOK3eaME5SVpZ4RjK9FrdfPDSwuVItAi1skVS0ZTnNI_uYkwXar2T1nfr2BtMu4FdIfPgUmkQS-sPqlnSflC7W-DZw_u-0VEvQ1WHW1sAk9w5ZfuTSIWgAXRWfTUNb40Kk7uI5UIY/s320/WM5.0_GPRS_1.jpg" alt="" id="BLOGGER_PHOTO_ID_5135180528382592914" border="0" /></a><br /><br />before write code we want to add windows mobile dll to project as references, so select Reference menu in your Project and go to .net tab(default), there can u see 5 dll like start name Microsoft windows mobile... Please select M.W.M and M.W.M.State and give ok, after return to your code window.<br /><br />Note(M.W.M -Microsoft.windows.mobile)<br /><br />write code like following code snippet. or copy and paste and change namespace to your project name<br /><br />using System;<br />using System.Collections.Generic;<br />using System.ComponentModel;<br />using System.Data;<br />using System.Drawing;<br />using System.Text;<br />using System.Windows.Forms;<br />using Microsoft.WindowsMobile.Status;<br />using System.Net;<br />using System.IO;<br />using System.Diagnostics;<br /><br />namespace InterNet<br />{<br />public partial class Form1 : Form<br />{<br /> public Form1()<br /> {<br /> InitializeComponent();<br /> }<br /><br /> bool _remoteServerReachable = false;<br /> bool _internetReachable = false;<br /> bool _networkConnected = false;<br /><br /> private void Form1_Load(object sender, EventArgs e)<br /> {<br /> _networkWatcher = new SystemState(SystemProperty.ConnectionsCount, false);<br /> _networkWatcher.Changed += new ChangeEventHandler(NetworkWatcher_Changed);<br /><br /> DetermineNetworkState(SystemState.ConnectionsCount);<br /> DisplayConnectionInfo();<br /> }<br /><br /><br /> private void Form1_Closing(object sender, CancelEventArgs e)<br /> {<br /> // When creating an instance of the SystemState class that runs on a background thread,<br /> // you must call the Dispose method to cause the background thread to exit.<br /> if (_networkWatcher != null)<br /> _networkWatcher.Dispose();<br /> }<br /><br /> SystemState _networkWatcher = null;<br /><br /> void NetworkWatcher_Changed(object sender, ChangeEventArgs args)<br /> {<br /> int connectionsCount = (int)args.NewValue;<br /> DetermineNetworkState(connectionsCount);<br /><br /> DisplayConnectionInfo();<br /> }<br /><br /> static Uri _remoteServerUrl = new Uri(@"http://somebogusurlthatwontexist.com/SQLSync/sqlcesa30.dll");<br /> // static Uri _remoteServerUrl = new Uri(@"http://192.168.1.102/SQLSync/sqlcesa30.dll");<br /> const string _remoteServerExpectedText = @"SQL Server";<br /> static Uri _internetReachableUrl = new Uri(@"http://mobile.live.com/search");<br /> const string _internetReachableExpectedText = @"Live Search";<br /> void DetermineNetworkState(int connectionsCount)<br /> {<br /> if (connectionsCount > 0)<br /> {<br /> _networkConnected = true;<br /> _remoteServerReachable = IsUrlReachable(_remoteServerUrl, _remoteServerExpectedText);<br /> _internetReachable = _remoteServerReachable ? true :<br /> IsUrlReachable(_internetReachableUrl, _internetReachableExpectedText);<br /> }<br /> else<br /> {<br /> _networkConnected = false;<br /> _internetReachable = false;<br /> _remoteServerReachable = false;<br /> }<br /> }<br /><br /> void DisplayConnectionInfo()<br /> {<br /> if (InvokeRequired)<br /> {<br /> Invoke((MethodInvoker)DisplayConnectionInfo);<br /> }<br /> else<br /> {<br /> txtNetworkConnected.Text = _networkConnected.ToString();<br /> txtRemoteServerReachable.Text = _remoteServerReachable.ToString();<br /> txtInternetReachable.Text = _internetReachable.ToString();<br /> }<br /> }<br /><br />#if PocketPC || Smartphone<br />// Required for the above Invoke call<br />// This delegate is already defined in the full .NET Framework<br />delegate void MethodInvoker();<br />#endif<br /><br /> const int _maxConnectTryCount = 2;<br /> const int _sleepTimeBetweenConnectTries = 100; // milliseconds<br /> bool IsUrlReachable(Uri url, string expectedText)<br /> {<br /> bool isUrlReachable = false;<br /> HttpWebRequest httpRequest = null;<br /> HttpWebResponse httpResponse = null;<br /> Stream responseStream = null;<br /> StreamReader responseReader = null;<br /><br /> for (int connectTryCount = 0;<br /> !isUrlReachable && connectTryCount < httprequest =" (HttpWebRequest)WebRequest.Create(url);" method = "GET" httpresponse =" (HttpWebResponse)httpRequest.GetResponse();" responsestream =" httpResponse.GetResponseStream();" responsereader =" new" responsetext =" responseReader.ReadToEnd();" isurlreachable =" expectedText">= 0;<br /> }<br /> catch (SystemException ex)<br /> {<br /> // write log<br />#if DEBUG<br /> Debug.WriteLine("");<br /> Debug.WriteLine(string.Format("Try:{0} | Url:{1}",<br /> connectTryCount.ToString(), url.ToString()));<br /> Debug.WriteLine(ex.Message);<br /> Debug.WriteLine("");<br />#endif<br /> }<br /> finally<br /> {<br /> if (responseReader != null)<br /> responseReader.Close();<br /> if (responseStream != null)<br /> responseStream.Close();<br /> if (httpResponse != null)<br /> httpResponse.Close();<br /> }<br /> if (!isUrlReachable)<br /> System.Threading.Thread.Sleep(_sleepTimeBetweenConnectTries);<br /> }<br /> return isUrlReachable;<br /> }<br /><br />}<br />}<br /><br />from and video demo <a href="http://msdn2.microsoft.com/en-us/netframework/bb851561.aspx"> http://msdn2.microsoft.com/en-us/netframework/bb851561.aspx</a><br /><br />and i would like to say thanks to <span style="font-weight: bold;">Jim wilson</span>.<br />I think you all are happy with WM 5.0 and WM 6.0<br /><br />will next articles<br />-RRaveRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com3tag:blogger.com,1999:blog-5320350318741133625.post-53069361181933255952007-11-06T06:44:00.000-08:002007-11-20T03:32:44.405-08:00LINQHi Guys<br /><br />u all heard about LINQ, it's a quite development features for query structured development<br /><br />see follow link and get more informations.<br /><br /><a href="http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx">http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx</a><br /><br />thanksRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-23353649499364522952007-11-06T06:41:00.000-08:002007-11-20T03:32:32.540-08:00VS 2008 Beta 2Hi guy<br /><br />You can downland VS 2008 beta 2 version below link<br /><br /><a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx">http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx</a><br /><br /><a href="http://http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx">http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx</a><br /><br />And one good news for all VS 2008 final version will be release end of this November 2007 feel happy and expect more features in Vs 2008<br /><br />ThanksRRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0tag:blogger.com,1999:blog-5320350318741133625.post-50938175299368530282007-11-06T06:37:00.000-08:002007-11-20T03:32:20.072-08:00The New features in .Net Compact Framework 3.5<div class="postcontent"> The .NET Compact Framework team has spent the last year planning and developing the next version of the .NET Compact Framework 3.5, which will align with the .NET Framework 3.5 shipping in next version of Visual Studio code named “Orcas”. The team has focused its efforts in 4 areas including, addressing core problems of creating distributed mobile applications by enabling mobile devices to interoperate with Windows Communication Foundation services, Implementing device specific features from LINQ, continuing to implement highly requested features and refining NETCF’s ability to diagnose and solve reliability and supportability issues. <br /><br />The first release of NETCF 3.5 went public a few weeks ago in the Orcas January CTP. This release of NETCF does not include the complete list of features but is a step toward the final feature set. New builds of NETCF will be included in each new public drop of Orcas with the majority of features being included by Orcas Beta1. Below is a list of features included in the January CTP. If you’re interested in these new features start by downloading the Orcas January CTP using either the VPC image at <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=1FF0B35D-0C4A-40B4-915A-5331E11C39E6&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=1FF0B35D-0C4A-40B4-915A-5331E11C39E6&displaylang=en</a> or try installing it to your test PC at <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=69055927-458B-4129-9047-FCC4FACAE96C&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=69055927-458B-4129-9047-FCC4FACAE96C&displaylang=en</a><br /><br /><br />New Features Included in the Orcas January CTP:<br />• System.IO.Compression support, including support for HTTP compression.<br />• Support for a subset of Linq’s Standard Query Operators.<br />• SoundPlayer support using WaveOut allowing for multiple sounds to play at once.<br />• New API in Microsoft.WindowsCE.Forms for easily distinguishing Smartphone and Pocket PC.<br />• Allow Nested FuncEval's.<br />• Enhanced logging for interop functionality with native code.<br />• Stack Trace Enhancements.<br />• GAC Improvements.<br />• Allow for StrongName keys greater than 1024 long.<br />• To improved logging of finalizer activities to enhance product supportability.<br />• Allow log files to be read at runtime. </div> <div><span id="ctl00___ctl00___ctl01___Entry___InlineTagEditorPanel"></span><input name="ctl00$_$ctl00$_$ctl01$_$Entry$_$InlineTagEditorPanel" id="ctl00___ctl00___ctl01___Entry___InlineTagEditorPanel_State" value="nochange" type="hidden"></div> <span style="font-weight: bold;"><br /><br />Thanks<br /></span> <h4> <a name="1547924"></a> </h4>RRavehttp://www.blogger.com/profile/02162942492813501463noreply@blogger.com0