public NodeSelectForm(INode rootNode, Func <T, bool> filter = null) { InitializeComponent(); if (StyleSet.CurrentStyle != null) { StyleHelpers.ApplyStyle(this, StyleSet.CurrentStyle); } Icon = ResourceStore.LoadIcon("Icons/Application.ico"); mRootNode = new ReferenceNode(rootNode); mRootNode.Populate(); foreach (var node in mRootNode.Nodes) { if (node.DataType != typeof(T)) { continue; } if (filter != null && !filter(( T )node.Data)) { continue; } mNodeTreeView.Nodes.Add(new NodeAsTreeNode(new ReferenceNode(node), true) { HideContextMenuStrip = true }); } StyleHelpers.ApplySystemFont(this); }
protected void Page_PreRender(object sender, EventArgs o) { using (MiniProfiler.Current.Step("LoadStyle")) { StyleHelpers.LoadStyle(this.Page); } using (MiniProfiler.Current.Step("LoadScript")) { ScriptHelpers.LoadScript(this.Page); } }
protected virtual void PageLoadComplete() { using (MiniProfiler.Current.Step("AddStyle and AddScript")) { StyleHelpers.AddStyle(this.Page, "Style"); ScriptHelpers.AddScript(this.Page, "Script"); } ExcutePrePageLoadCompleteJs(); ExcutePageLoadCompletedJs(); }
public TextureSelectForm(INode textureSetNode, MaterialTextureType type) : this( textureSetNode ) { mMaterialTextureTypeLabel.Visible = true; mMaterialTextureTypeComboBox.Visible = true; foreach (string typeName in Enum.GetNames(typeof(MaterialTextureType))) { mMaterialTextureTypeComboBox.Items.Add(typeName); } mMaterialTextureTypeComboBox.SelectedIndex = ( int )type; StyleHelpers.ApplySystemFont(this); }
public MainForm() { InitializeComponent(); Icon = ResourceStore.LoadIcon("Icons/Application.ico"); SetTitle(); Select(); #if DEBUG mPropertyGrid.BrowsableAttributes = new AttributeCollection(); #endif StyleHelpers.ApplySystemFont(this); }
public ConfigurationForm() { InitializeComponent(); Icon = ResourceStore.LoadIcon("Icons/Application.ico"); mConfigurationList = ( ConfigurationList )ConfigurationList.Instance.Clone(); mOriginalMap = new Dictionary <Configuration, Configuration>(); for (int i = 0; i < mConfigurationList.Configurations.Count; i++) { mOriginalMap[mConfigurationList.Configurations[i]] = ConfigurationList.Instance.Configurations[i]; } StyleHelpers.ApplySystemFont(this); }
public StyledButton(Borders border, double opacity = 0) { BackgroundColor = Color.Transparent; TextColor = Color.White; FontSize = 18; Opacity = opacity; FontFamily = StyleHelpers.GetFontFamily(); switch (border) { case Borders.None: break; case Borders.Thin: BorderRadius = 3; BorderColor = Color.White; BorderWidth = 1; break; } }
public TextureSelectForm(INode textureSetNode) { InitializeComponent(); if (StyleSet.CurrentStyle != null) { StyleHelpers.ApplyStyle(this, StyleSet.CurrentStyle); } Icon = ResourceStore.LoadIcon("Icons/Application.ico"); var rootNode = new ReferenceNode(textureSetNode); var nodeAsTreeNode = new NodeAsTreeNode(rootNode); mNodeTreeView.Nodes.Add(nodeAsTreeNode); nodeAsTreeNode.Expand(); nodeAsTreeNode.Nodes[0].Expand(); }
protected override void OnLoad(EventArgs eventArgs) { if (Type.GetType("Mono.Runtime") == null) { StyleHelpers.StoreDefaultStyle(this); if (StyleSet.CurrentStyle != null) { StyleHelpers.ApplyStyle(this, StyleSet.CurrentStyle); } StyleSet.StyleChanged += OnStyleChanged; InitializeStylesToolStripMenuItem(); } if (!ValueCache.Get <bool>("IsNotFirstLaunch")) { using (var firstLaunchForm = new FirstLaunchForm()) firstLaunchForm.ShowDialog(this); ValueCache.Set("IsNotFirstLaunch", true); } ModelViewControl.UseOrbitCamera = ValueCache.Get("UseOrbitCamera", true); UpdateCameraModeFlags(); mAutoCheckUpdatesToolStripMenuItem.Checked = ValueCache.Get("AutoCheckUpdates", true); if (mAutoCheckUpdatesToolStripMenuItem.Checked) { new Thread(() => CheckForUpdates(false)).Start(); } SetStyle(ControlStyles.DoubleBuffer, true); base.OnLoad(eventArgs); }
public StyledButton(Borders border, double opacity = 0) { BackgroundColor = Color.Transparent; TextColor = Color.White; FontSize = 18; Opacity = opacity; FontFamily = StyleHelpers.GetFontFamily(); switch (border) { case Borders.None: break; case Borders.Thin: CornerRadius = 3; BorderColor = Color.White; BorderWidth = 1; break; default: throw new NotSupportedException(); } }
public FarcArchiveViewForm(FarcArchive farcArchive) { InitializeComponent(); if (StyleSet.CurrentStyle != null) { StyleHelpers.ApplyStyle(this, StyleSet.CurrentStyle); } Icon = ResourceStore.LoadIcon("Icons/Application.ico"); mFarcArchive = farcArchive; mRootNode = new FarcArchiveNode("FARC Archive", mFarcArchive); mRootNode.Populate(); foreach (var node in mRootNode.Nodes.Where(x => x.DataType == typeof(T))) { mNodeTreeView.Nodes.Add(new NodeAsTreeNode(new ReferenceNode(node), true) { HideContextMenuStrip = true }); } }
private void OnStyleChanged(object sender, StyleChangedEventArgs eventArgs) { StyleHelpers.ApplyStyle(this, eventArgs.Style); Refresh(); }