public static void DataSyncSettingClick(IocManager iocManager, IFormIOSchemeManager formIOSchemeManager, IDataSyncSettingsManager dataSyncSettingManager, ILogger logger) { DialogHybirdForm <FormIOControl> dialog = new DialogHybirdForm <FormIOControl>(iocManager, typeof(ZtgeoGisHybridMoudle).Assembly, new string[] { "WebViews", "FormIO", "FormIoWebView.html" }); dialog.Size = new Size(1260, 760); dialog.FormBorderStyle = FormBorderStyle.FixedToolWindow; dialog.StartPosition = FormStartPosition.CenterScreen; string component = formIOSchemeManager.GetFormIOSchemeById(1); string data = dataSyncSettingManager.GetDataSyncSettings(); ((FormIOControl)dialog.hybridControl).SetFormIOComponentAndData(component, data); ((FormIOControl)dialog.hybridControl).OnSave = (control, submissionData) => { try { dynamic subdata = JsonConvert.DeserializeObject <dynamic>(submissionData); dataSyncSettingManager.SetDataSyncSettings(subdata); } catch (Exception ex) { EventBus.Default.Trigger(new NonUIExceptionEventData { UnhandledExceptionEventArgs = new UnhandledExceptionEventArgs(ex, false) }); } }; dialog.ShowDialog(); }
public DataSyncSettingAction(IocManager _iocManager, IFormIOSchemeManager _formIOSchemeManager, IDataSyncSettingsManager _dataSyncSettingManager ) { iocManager = _iocManager; formIOSchemeManager = _formIOSchemeManager; dataSyncSettingsManager = _dataSyncSettingManager; Logger = NullLogger.Instance; }
public DataSyncMenuProvider(IocManager _iocManager, IFormIOSchemeManager _formIOSchemeManager, IDataSyncSettingsManager _dataSyncSettingManager, DataSyncOperator _dataSyncOperator, DataCapture _dataCapture, TriggerOperation _triggerOperation ) { iocManager = _iocManager; formIOSchemeManager = _formIOSchemeManager; dataSyncSettingManager = _dataSyncSettingManager; dataSyncOperator = _dataSyncOperator; dataCapture = _dataCapture; triggerOperation = _triggerOperation; Logger = NullLogger.Instance; }
public static void ShowDialog(IocManager iocManager, IFormIOSchemeManager formIOSchemeManager, ILoginManager loginManager) { DialogHybirdForm <FormIOControl> dialog = new DialogHybirdForm <FormIOControl>(iocManager, typeof(ZtgeoGisHybridMoudle).Assembly, new string[] { "WebViews", "FormIO", "FormIoWebView.html" }); dialog.Size = new Size(550, 520); dialog.MaximizeBox = false; dialog.MinimizeBox = false; dialog.StartPosition = FormStartPosition.CenterScreen; dialog.ShowIcon = true; dialog.Icon = new Icon(AssemblyResource.GetResourceStream(typeof(ZtgeoGISDesktopMoudle).Assembly, "ZtgeoGISDesktop.Icons.login.ico")); string component = formIOSchemeManager.GetFormIOSchemeById(2); ((FormIOControl)dialog.hybridControl).SetFormIOComponentAndData(component, "{}"); ((FormIOControl)dialog.hybridControl).OnSave = (control, submissionData) => { try { dynamic subdata = JsonConvert.DeserializeObject <dynamic>(submissionData); var authenticateResultModel = loginManager.Login(new Ztgeo.Gis.Runtime.Authorization.AuthenticateModel { UserNameOrEmailAddress = subdata.data.UserName, Password = subdata.data.Password }, (bool)subdata.data.IsServerless); if (authenticateResultModel != null && authenticateResultModel.ShouldResetPassword) { MessageBox.Show("密码需要重置,请联系管理员"); return; } if (authenticateResultModel != null) { dialog.DialogResult = DialogResult.OK; dialog.Close(); } } catch (Exception ex) { EventBus.Default.Trigger(new NonUIExceptionEventData { UnhandledExceptionEventArgs = new UnhandledExceptionEventArgs(ex, false) }); } }; if (dialog.ShowDialog() == DialogResult.Cancel) { System.Environment.Exit(0); } }
public MainForm(IocManager iocManager, IFormIOSchemeManager _formIOSchemeManager, ProductInfo _productInfo) { IocManager = iocManager; formIOSchemeManager = _formIOSchemeManager; productInfo = _productInfo; }
public MainForm(IocManager iocManager, IFormIOSchemeManager _formIOSchemeManager) { IocManager = iocManager; formIOSchemeManager = _formIOSchemeManager; }