private void Migrate2xClickedHandler(object o, EventArgs args) { bool if2Present = true; string str = Mono.Unix.UnixEnvironment.EffectiveUser.HomeDirectory; if(!System.IO.Directory.Exists(str+"/.novell/ifolder")) { if2Present = false; } else { string[] dirs; dirs = System.IO.Directory.GetDirectories(str+"/.novell/ifolder"); str = str+"/.novell/ifolder"; int i; for(i=0;i<dirs.Length;i++) { if(dirs[i] != str+"/reg" && dirs[i] != str+"/Save") { break; } } if( i == dirs.Length) if2Present = false; } if( if2Present == false) { iFolderMsgDialog NoiF2Dialog = new iFolderMsgDialog( null, iFolderMsgDialog.DialogType.Info, iFolderMsgDialog.ButtonSet.Ok, Util.GS("iFolder Migration"), Util.GS("There is no iFolder 2.x data present on this computer."),Util.GS(" ")); NoiF2Dialog.Run(); NoiF2Dialog.Hide(); NoiF2Dialog.Destroy(); return; } MigrationWindow migrationWindow = new MigrationWindow(this, ifws, simws); migrationWindow.ShowAll(); return; }
private bool ShowiFolderWindows() { if (domainController == null) domainController = DomainController.GetDomainController(); if (domainController != null) { DomainInformation[] domains = domainController.GetDomains(); if (domains.Length < 1) { ShowAddAccountWizard(); } else { if(! (bool)ClientConfig.Get(ClientConfig.KEY_IFOLDER_WINDOW_HIDE)) Util.LoadiFolderWindows(); Debug.PrintLine("Showing the migration prompt"); if( Util.ShowMigrationPrompt() ) { string str = Mono.Unix.UnixEnvironment.EffectiveUser.HomeDirectory; if(System.IO.Directory.Exists(str+"/.novell/ifolder")) { string[] dirs; dirs = System.IO.Directory.GetDirectories(str+"/.novell/ifolder"); if( dirs.Length > 2) { iFolderMsgDialog dlg = new iFolderMsgDialog( null, iFolderMsgDialog.DialogType.Info, iFolderMsgDialog.ButtonSet.OkCancel, Util.GS("Migration Alert"), Util.GS("There are 2.x iFolders on this machine.") , Util.GS("Do you want to migrate them?") ); CheckButton dontShowAgain = new CheckButton(Util.GS("Don't show this message again")); dlg.ExtraWidget = dontShowAgain; int res = dlg.Run(); dlg.Hide(); dlg.Destroy(); if( ((CheckButton)(dlg.ExtraWidget)).Active == true) { Debug.PrintLine("The check box is checked"); Util.DontShowMigrationPrompt(); } else Debug.PrintLine("The check box is not checked"); if( res == (int)ResponseType.Ok) { MigrationWindow migrationWindow = new MigrationWindow( Util.GetiFolderWindow(), ifws, simws); migrationWindow.ShowAll(); } } } } } } else Debug.PrintLine("DomainController instance is null"); return false; }