public GlobalProperties(iFolderWebService ifolderWebService, SimiasWebService simiasWebService, IProcEventClient eventClient) { syncCollectionDelegate = new SyncCollectionDelegate(syncCollection); syncFileDelegate = new SyncFileDelegate(syncFile); createChangeEventDelegate = new CreateChangeEventDelegate(createChangeEvent); deleteEventDelegate = new DeleteEventDelegate(deleteEvent); addDomainToListDelegate = new AddDomainToListDelegate(AddDomainToList); refreshiFoldersDelegate = new RefreshiFoldersDelegate(refreshiFoldersInvoke); InitializeComponent(); MoreInitialization(); PluginEnhancedMenu(); infoMessage = new NoiFolderMessage(); panel2.Controls.Add(infoMessage); progressBar1.Visible = false; ifWebService = ifolderWebService; this.simiasWebService = simiasWebService; this.eventClient = eventClient; eventClient.SetEvent(IProcEventAction.AddCollectionSync, new IProcEventHandler(global_collectionSyncHandler)); eventClient.SetEvent(IProcEventAction.AddFileSync, new IProcEventHandler(global_fileSyncHandler)); updateEnterpriseTimer = new System.Timers.Timer(1000); updateEnterpriseTimer.AutoReset = false; updateEnterpriseTimer.Elapsed += new System.Timers.ElapsedEventHandler(updateEnterpriseTimer_Elapsed); ht = new Hashtable(); progressBar1.Minimum = 0; this.StartPosition = FormStartPosition.CenterScreen; try { this.Icon = new Icon(Path.Combine(Application.StartupPath, @"res\ifolder_16.ico")); largeImageList = new ImageList(); largeImageList.ImageSize = new Size(48, 48); largeImageList.ColorDepth = ColorDepth.Depth32Bit; largeImageList.TransparentColor = Color.Black; largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder48.png"))); largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-sync48.png"))); largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-download48.png"))); largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-upload48.png"))); largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-waiting48.png"))); largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-conflict48.png"))); largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-error48.png"))); largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\encrypt_ilock_48.gif"))); largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder_user_48.png"))); largeImageList.Images.Add(Bitmap.FromFile(Path.Combine(Application.StartupPath, @"res\ifolder-warning48.png"))); iFolderView.LargeImageList = largeImageList; } catch { } }
public GlobalProperties(iFolderWebService ifolderWebService, SimiasWebService simiasWebService, IProcEventClient eventClient) { syncCollectionDelegate = new SyncCollectionDelegate(syncCollection); syncFileDelegate = new SyncFileDelegate(syncFile); createChangeEventDelegate = new CreateChangeEventDelegate(createChangeEvent); deleteEventDelegate = new DeleteEventDelegate(deleteEvent); InitializeComponent(); progressBar1.Visible = false; ifWebService = ifolderWebService; this.simiasWebService = simiasWebService; this.eventClient = eventClient; eventClient.SetEvent(IProcEventAction.AddCollectionSync, new IProcEventHandler(global_collectionSyncHandler)); eventClient.SetEvent(IProcEventAction.AddFileSync, new IProcEventHandler(global_fileSyncHandler)); updateEnterpriseTimer = new System.Timers.Timer(1000); updateEnterpriseTimer.AutoReset = false; updateEnterpriseTimer.Elapsed += new System.Timers.ElapsedEventHandler(updateEnterpriseTimer_Elapsed); ht = new Hashtable(); progressBar1.Minimum = 0; this.StartPosition = FormStartPosition.CenterScreen; try { this.Icon = new Icon(Path.Combine(Application.StartupPath, @"ifolder_app.ico")); this.iFolderView.SmallImageList = new ImageList(); iFolderView.SmallImageList.Images.Add(new Icon(Path.Combine(Application.StartupPath, @"res\ifolder_loaded.ico"))); iFolderView.SmallImageList.Images.Add(new Icon(Path.Combine(Application.StartupPath, @"res\serverifolder.ico"))); iFolderView.SmallImageList.Images.Add(new Icon(Path.Combine(Application.StartupPath, @"res\ifolderconflict.ico"))); toolBar1.ImageList = new ImageList(); toolBar1.ImageList.ImageSize = new Size(24, 24); toolBar1.ImageList.TransparentColor = Color.White; toolBar1.ImageList.Images.AddStrip(Image.FromFile(Path.Combine(Application.StartupPath, @"res\mtoolbar_nor.bmp"))); toolBar1.DisabledImageList = new ImageList(); toolBar1.DisabledImageList.ImageSize = new Size(24, 24); toolBar1.DisabledImageList.TransparentColor = Color.White; toolBar1.DisabledImageList.Images.AddStrip(Image.FromFile(Path.Combine(Application.StartupPath, @"res\mtoolbar_dis.bmp"))); toolBar1.HotImageList = new ImageList(); toolBar1.HotImageList.ImageSize = new Size(24, 24); toolBar1.HotImageList.TransparentColor = Color.White; toolBar1.HotImageList.Images.AddStrip(Image.FromFile(Path.Combine(Application.StartupPath, @"res\mtoolbar_hot.bmp"))); toolBarCreate.ImageIndex = 0; toolBarSetup.ImageIndex = 1; toolBarShare.ImageIndex = 2; toolBarResolve.ImageIndex = 3; toolBarSync.ImageIndex = 4; } catch {} this.MinimumSize = this.Size; }