本文整理汇总了C#中MainForm类的典型用法代码示例。如果您正苦于以下问题:C# MainForm类的具体用法?C# MainForm怎么用?C# MainForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MainForm类属于命名空间,在下文中一共展示了MainForm类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Check
protected override void Check(MainForm form, string ext, RegistryKey rk, DataEntry[] de)
{
RegistryKey r = null;
using (r = Registry.ClassesRoot.OpenSubKey(string.Format(CultureInfo.InvariantCulture, "{0}\\ShellEx\\{1}", ext, ShellExGuid)))
{
CheckValue(form, r, null, new string[] { ThumnailCacheGuid }, de);
}
if (r == null)
{
using (r = Registry.ClassesRoot.OpenSubKey(string.Format(CultureInfo.InvariantCulture, "SystemFileAssociations\\{0}\\ShellEx\\{1}", ext, ShellExGuid)))
{
CheckValue(form, r, null, new string[] { ThumnailCacheGuid }, de);
}
}
if (r == null)
{
string type = CheckStringValue(form, rk, PerceivedType, de);
using (r = OpenSubKey(form, Registry.ClassesRoot, string.Format(CultureInfo.InstalledUICulture, "SystemFileAssociations\\{0}\\ShellEx\\{1}", type, ShellExGuid), de))
{
CheckValue(form, r, null, new string[] { ThumnailCacheGuid }, de);
}
}
}
示例2: ConfigDocument
public ConfigDocument(MainForm form)
{
InitializeComponent();
ShowHint = DockState.Document;
Show(form.DockPanel);
SetEditor(GetEditor());
}
示例3: SilkroadTunnel
public SilkroadTunnel(SilkroadProxy silkroadProxy, List<SilkroadTunnel> tunnels, MainForm mainForm)
{
_remoteIP = "123.30.200.6";
_remotePort = 15779;
_silkroadProxy = silkroadProxy;
_localContext = new Context();
_localContext.MySecurity.GenerateSecurity(true, true, true);
_remoteContext = new Context();
_localContext.MyRelaySecurity = _remoteContext.MySecurity;
_remoteContext.MyRelaySecurity = _localContext.MySecurity;
_contexts = new List<Context>();
_contexts.Add(_localContext);
_contexts.Add(_remoteContext);
_tunnels = tunnels;
_mainForm = mainForm;
if (_mainForm != null)
{
_charracter = new Charracter(_mainForm);
}
}
示例4: Main
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
try
{
InitializeTraceLevel();
AppContainer container = new AppContainer();
MainForm form = new MainForm();
container.Add(form);
logger.Info("Starting CodeBuilder");
Application.Run(form);
logger.Info("CodeBuilder Exit");
}
catch (Exception ex)
{
logger.Error("Startup", ex);
MessageBoxHelper.DisplayFailure(ex.Message);
}
InternalTrace.Close();
}
示例5: Search
public Search(MainForm.CheckInstallDirsCB checkInstallDirsCB, MainForm.updateProgressCallback updateProgressCB, MainForm.listViewAddCallBack listViewAddCB)
: this()
{
this.checkInstallDirsCB = checkInstallDirsCB;
this.updateProgressCB = updateProgressCB;
this.listViewAddCB = listViewAddCB;
}
示例6: DataTablePropertiesDialog
/// <summary>
/// Default constructor for the class
/// </summary>
public DataTablePropertiesDialog(MainForm frm, Project currentProject, View view)
: base(frm)
{
InitializeComponent();
project = currentProject;
currentView = view;
}
示例7: CreateObjectChooser
public static ObjectChooser CreateObjectChooser(MainForm.DoWaitCallback doWaitCB, MainForm.StopWaitCallback stopWaitCB,
MainForm.updateProgressCallback updateProgressCB, MainForm.listViewAddCallBack listViewAddCB, CatalogType resourceType,
EventHandler<MainForm.SelectedIndexChangedEventArgs> selectedIndexChangedHandler,
EventHandler<MainForm.ItemActivateEventArgs> itemActivateHandler)
{
ObjectChooser res;
if (!objectChooserCache.ContainsKey(resourceType))
{
res = new ObjectChooser(doWaitCB, stopWaitCB, updateProgressCB, listViewAddCB, resourceType);
res.SelectedIndexChanged += selectedIndexChangedHandler;
res.ItemActivate += itemActivateHandler;
return res;
}
res = objectChooserCache[resourceType];
res.SelectedIndexChanged = null;
res.SelectedItem = null;
res.listView1.SelectedItems.Clear();
res.SelectedIndexChanged += selectedIndexChangedHandler;
res.ItemActivate = null;
res.ItemActivate += itemActivateHandler;
return res;
}
示例8: ConfigForm
public ConfigForm(MainForm fmMain)
{
InitializeComponent();
this.fmMain = fmMain;
cbDbs.Text = MainForm.myCmdMgr.Config.local;
btnOK.Focus();
}
示例9: DailyScheduleView
public static void DailyScheduleView(DataGridView view, MainForm mainForm)
{
if (view.DataSource == null)
{
return;
}
view.ColumnHeadersVisible = false;
view.RowHeadersVisible = false;
view.DefaultCellStyle.WrapMode = DataGridViewTriState.True;
view.AutoResizeColumns();
view.AutoResizeRows();
view.AllowUserToResizeColumns = false;
view.AllowUserToResizeRows = false;
// LessonId
view.Columns[0].Visible = false;
view.Columns[0].Width = 0;
// Ring
view.Columns[1].Width = 56;
view.Columns[1].DefaultCellStyle.Font = new Font(view.DefaultCellStyle.Font.FontFamily, 14);
view.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
// LessonSummary
// view.Columns[2].Width = Percent(88, view.Width);
view.Columns[2].Width = view.Width - view.Columns[1].Width - 20;
}
示例10: Main
static void Main()
{
if (Control.ModifierKeys == (Keys.Control | Keys.Shift))
{
Globals.EDITION = Edition.Research;
}
else if (Control.ModifierKeys == Keys.Shift)
{
Globals.EDITION = Edition.Lite;
}
else if (Control.ModifierKeys == Keys.Control)
{
Globals.EDITION = Edition.Grammar;
}
else // default
{
Globals.EDITION = Edition.Standard;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
MainForm form = new MainForm();
// disable the X close button of the form
//IntPtr system_menu_handle = GetSystemMenu(form.Handle, false);
//DisableCloseIcon(system_menu_handle);
Application.Run(form);
}
示例11: AppContext
public AppContext()
{
this.f1 = new MainForm();
this.f1.manualOnLoad();
this.f1.Visible = false;
this.f1.VisibleChanged += new EventHandler(this.f1_VisibleChanged);
}
示例12: SledGotoService
public SledGotoService(
MainForm mainForm,
IControlHostService controlHostService)
{
m_mainForm = mainForm;
m_controlHostService = controlHostService;
}
示例13: RestoreForm
public override void RestoreForm(MainForm form)
{
if (form.Opacity == 0.0)
form.Opacity = 1.0;
form.Show();
}
示例14: TrafficVolumeForm
/// <summary>
/// Constructor
/// </summary>
public TrafficVolumeForm(VerkehrSteuerung steuerung, MainForm mainForm, NodeSteuerung nodeController)
{
this.m_steuerung = steuerung;
this.m_mainForm = mainForm;
this.m_nodeController = nodeController;
InitializeComponent();
this.splitContainer1.Panel2MinSize = 260;
UpdateListboxLayout();
GetTrafficVolume();
this.m_steuerung.StartPointsChanged += new VerkehrSteuerung.StartPointsChangedEventHandler(m_steuerung_StartPointsChanged);
this.m_steuerung.DestinationPointsChanged += new VerkehrSteuerung.DestinationPointsChangedEventHandler(m_steuerung_DestinationPointsChanged);
this.m_steuerung.GlobalTrafficMultiplierChanged += new VerkehrSteuerung.GlobalTrafficMultiplierChangedEventHandler(m_steuerung_GlobalTrafficMultiplierChanged);
this.m_steuerung.CarTargetVelocityChanged += new VerkehrSteuerung.CarTargetVelocityChangedEventHandler(m_steuerung_CarTargetVelocityChanged);
this.m_steuerung.TruckTargetVelocityChanged += new VerkehrSteuerung.TruckTargetVelocityChangedEventHandler(m_steuerung_TruckTargetVelocityChanged);
this.m_steuerung.BusTargetVelocityChanged += new VerkehrSteuerung.BusTargetVelocityChangedEventHandler(m_steuerung_BusTargetVelocityChanged);
this.m_steuerung.TramTargetVelocityChanged += new VerkehrSteuerung.TramTargetVelocityChangedEventHandler(m_steuerung_TramTargetVelocityChanged);
renderOptions.renderLineNodes = false;
renderOptions.renderNodeConnections = true;
renderOptions.renderVehicles = false;
renderOptions.performClipping = false;
renderOptions.clippingRect = new Rectangle(0, 0, 10000, 10000);
renderOptions.renderIntersections = false;
renderOptions.renderLineChangePoints = false;
renderOptions.renderLineNodeDebugData = false;
renderOptions.renderNodeConnectionDebugData = false;
renderOptions.renderVehicleDebugData = false;
}
示例15: MainController
public MainController()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
cypher = new Cypher();
form = new MainForm(this);
}