private void EditSecurity_Click(object sender, EventArgs e) { bool found = false; if (Security.SelectedItem == null) { MessageBox.Show("Must Select a security module to configure..."); return; } Type t = (Security.SelectedItem as TypeName).Type; foreach (object s in that.security_tags) { if (s.GetType() == t) { IReflectorPersistance persis = s as IReflectorPersistance; if (persis != null) { // maybe mark this security module as using this ? persis.Properties(); } found = true; } } if (!found) { object o = Activator.CreateInstance(t); that.security_tags.Add(o); IReflectorPersistance persis = o as IReflectorPersistance; if (persis != null) { persis.Properties(); } } }
internal static void item_Click(object sender, EventArgs e) { object plugin = (sender as TypeMenuItem).o; IReflectorPersistance persis = plugin as IReflectorPersistance; persis.Properties(); }
static void PropertyClick(Object s, EventArgs e) { bool did_property = false; if (local.current_mouse_control != null) { IReflectorPersistance pc = local.current_mouse_control.o as IReflectorPersistance; if (pc != null) { pc.Properties(); did_property = true; } if (!did_property) { pc = local.current_mouse_control.c as IReflectorPersistance; if (pc != null) { pc.Properties(); did_property = true; } } } if (!did_property) { Control c = local.current_mouse_control.o as Control; if (c != null) { new EditControl(c).ShowDialog(); did_property = true; } } if (!did_property) { if (local.current_mouse_page != null) { local.current_mouse_page.PropertyClick(); } } }
private void buttonEdit_Click(object sender, EventArgs e) { osalot.AssemblyObject o = Actions.SelectedItem as osalot.AssemblyObject; if (o == null) { MessageBox.Show("Bad element selection"); return; } IReflectorPersistance persis = o.o as IReflectorPersistance; if (persis != null) { persis.Properties(); } // content of the data source (the action item text for instance) may have changed... Actions.DataSource = null; Actions.DataSource = editing_macro.buttons; }
void PropertyClickBypass(Object s, EventArgs e) { bool did_property = false; if (current_control != null) { IReflectorPersistance pc = current_control.c as IReflectorPersistance; if (pc != null) { pc.Properties(); did_property = true; } } if (!did_property) { current_page.PropertyClick(); Refresh(); this.BackgroundImage = current_page.background_image; } }
private void buttonConfigureSecurity_Click(object sender, EventArgs e) { bool found = false; if (listBoxSecurity.SelectedItem == null) { MessageBox.Show("Must Select a security module to configure..."); return; } Type t = (listBoxSecurity.SelectedItem as TypeName).Type; foreach (object s in that.security_tags) { if (s.GetType() == t) { // already have that tag created, so edit it. IReflectorPersistance persis = s as IReflectorPersistance; if (persis != null) { // maybe mark this security module as using this ? persis.Properties(); } found = true; } } if (!found) { // didn't have that tag associated with the page yet, so create one object o = Activator.CreateInstance(t); that.security_tags.Add(o as IReflectorSecurity); IReflectorPersistance persis = o as IReflectorPersistance; if (persis != null) { // and configure its properties persis.Properties(); } } }