/// <summary>
 /// Constructor.
 /// </summary>
 public GXDeviceProfileDlg(bool device, GXSelectDeviceProfileEventArgs arguments)
 {            
     InitializeComponent();
     Device = device;
     Arguments = arguments;
     Bitmap bm = PublisherImage.BackgroundImage as Bitmap;
     bm.MakeTransparent();
     PublisherImage.BackgroundImage = bm;
     CustomCB.Enabled = DownloadCB.Enabled = ShowEarlierVersionsCB.Enabled = OKBtn.Enabled = Arguments.Edit;
     SearchTB.ReadOnly = !Arguments.Edit;
     //Add search to device profile text box.
     bm = Gurux.Device.Properties.Resources.Search;
     bm.MakeTransparent();
     PictureBox pic = new PictureBox();
     pic.BackgroundImage = bm;
     pic.Width = pic.BackgroundImage.Width;
     pic.Height = pic.BackgroundImage.Height;
     pic.Dock = DockStyle.Right;
     pic.Cursor = Cursors.Arrow;
     pic.Click += new EventHandler(ShowProfiles);
     SearchTB.Controls.Add(pic);            
 }
示例#2
0
 /// <summary>
 /// Select custom, preset or downloadable device profile.
 /// </summary>
 /// <param name="parent">Parent window.</param>
 /// <param name="e">Parameters.</param>
 /// <returns>Selected device profile or null if no new profile is selected.</returns>
 static public GXDeviceProfile SelectProfile(System.Windows.Forms.Form parent, GXSelectDeviceProfileEventArgs e)
 {
     GXDeviceProfileDlg dlg = new GXDeviceProfileDlg(false, e);
     dlg.ShowDialog(parent);
     return e.Target as GXDeviceProfile;
 }