public override void OnInspectorGUI() { if (connections != null) { foreach (Connection c in connections) { if (c == null || c.Equals(null)) { continue; } Editor.CreateCachedEditor(c, typeof(ConnectionEditor), ref editor); editorC = editor as ConnectionEditor; index = editorC.GetIndex(t.transform as RectTransform); editorC.serializedObject.Update(); EditorGUILayout.Separator(); Rect box = EditorGUILayout.BeginVertical(); box.y -= 4f; box.height += 8f; box.x -= 4f; box.width += 5f; EditorGUI.DrawRect(box, boxColor); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button(delGUI, EditorStyles.miniButton, delLayout)) { DestroyImmediate(c.gameObject); EditorUtility.SetDirty(ConnectionManager.instance); continue; } if (GUILayout.Button(selGUI, EditorStyles.miniButton, selLayout)) { Selection.activeObject = c; } EditorGUILayout.EndHorizontal(); editorC.DrawConnectionPointInspector(index); EditorGUILayout.LabelField("↓ ↓", arrowStyle); editorC.DrawTargetInspector(index == 0 ? 1 : 0); EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); editorC.serializedObject.ApplyModifiedProperties(); } } if (GUILayout.Button("Add New Connection", EditorStyles.miniButton)) { ConnectionManager.CreateConnection(t1, null); EditorUtility.SetDirty(ConnectionManager.instance); GetConnections(); } }
//public DataAdapterWizard() : this(new IngresDataAdapter(), null) //{ //} public DataAdapterWizard( IngresDataAdapter adapter, System.ComponentModel.Design.IDesignerHost host) { Form dlgWelcome = new DataAdapterWizardWelcomeForm(); DataAdapterWizardGenerateForm dlgGenerate = null; DialogResult result = DialogResult.OK; //goto debugLabel; ShowWelcome: result = dlgWelcome.ShowDialog(); if (result == DialogResult.Cancel) // if Cancel button, return { return; } //debugLabel: ConnectionEditor connectionEditor = new ConnectionEditor(adapter, host); if (dlgGenerate == null) { dlgGenerate = new DataAdapterWizardGenerateForm(adapter.SelectCommand); } //ShowGenerate: result = dlgGenerate.ShowDialog(); if (result == DialogResult.Cancel) // if Cancel button, return { return; } // update the SelectCommand with the entry from the form's text if (result == DialogResult.Retry) // if Back button, go back one { goto ShowWelcome; } adapter.SelectCommand.CommandText = dlgGenerate.CommandText; try { TableMappings.Generate(adapter); } catch (Exception ex) { MessageBox.Show( "Could not generate DataAdapter's TableMappings.\n" + ex.Message, "Data Adapter Wizard"); } }
/// <summary> /// Method triggere when the user selects a block to edit /// </summary> private void BlockList_SelectedIndexChanged(object sender, System.EventArgs e) { if (BlockList.SelectedIndex < 0) { _selected = null; BlockViewComponent.SetViewingComponent(null); ConnectionEditor.SetViewingComponent(_core, null); return; } // List information about the selected block _selected = (IConnectable)BlockList.SelectedItem; BlockViewComponent.SetViewingComponent(_selected); // Update the connection connector ConnectionEditor.SetViewingComponent(_core, _selected); }
private void btnResetServerCache_Click(object sender, EventArgs e) { string msg; using (var rsc = new ConnectionEditorForm()) { if (rsc.ShowDialog(this.ParentForm) == DialogResult.OK) { foreach (var conn in rsc.SelectedConnections) { var arasConn = ConnectionEditor.Login(conn, out msg); if (arasConn == null) { MessageBox.Show(msg); } else { arasConn.CallAction("ResetServerCache", "<Item/>"); } } } } }
public void GoNext() { ConnectionManager.Current.Save(); if (!connEditor.SelectedConnections.Any()) { MessageBox.Show(resources.Messages.NoConnectionSelected); } else { string msg; _wizard.ConnectionInfo = connEditor.SelectedConnections; var conn = ConnectionEditor.Login(_wizard.ConnectionInfo.First(), out msg); if (conn == null) { MessageBox.Show(msg); } else { _wizard.Connection = conn; this.GoNextAction(); } } }
private bool StartInstall(bool isLoggedIn) { if (_connections.Any()) { if (!isLoggedIn) { string msg; var conn = ConnectionEditor.Login(_connections.First(), out msg); if (conn == null) { MessageBox.Show(msg); return(false); } else { _wizard.InstallProcessor.ActionComplete -= InstallProcessor_ActionComplete; _wizard.InstallProcessor.ErrorRaised -= InstallProcessor_ErrorRaised; _wizard.InstallProcessor.ProgressChanged -= InstallProcessor_ProgressChanged; _wizard.Connection = conn; _wizard.InstallProcessor.ActionComplete += InstallProcessor_ActionComplete; _wizard.InstallProcessor.ErrorRaised += InstallProcessor_ErrorRaised; _wizard.InstallProcessor.ProgressChanged += InstallProcessor_ProgressChanged; } } _ex = null; var thread = new Thread(o => { _wizard.InstallProcessor.Initialize(_wizard.InstallScript); _wizard.InstallProcessor.Install(); }); thread.Start(); return(true); } return(false); }