ComparisonInfo RequestComparisonInfo() { uint cid = statusbar.GetContextId("assemblies"); statusbar.Pop(cid); statusbar.Push(cid, "Choosing Base Assembly"); FileChooserDialog d = new FileChooserDialog("Choose Base Assembly", this, FileChooserAction.Open, Stock.Cancel, ResponseType.Cancel, Stock.Open, ResponseType.Accept); FileFilter filter = new FileFilter(); filter.AddPattern("*.dll"); d.Filter = filter; if ((ResponseType)d.Run() == ResponseType.Cancel) { d.Destroy(); return(null); } d.Hide(); string base_path = d.Filename; statusbar.Pop(cid); statusbar.Push(cid, "Choosing Target Assembly"); d.Title = "Choose Target Assembly"; if ((ResponseType)d.Run() == ResponseType.Cancel) { d.Destroy(); return(null); } string target_path = d.Filename; d.Hide(); d.Destroy(); return(new ComparisonInfo(base_path, target_path)); }
///<summary> /// Updates the cursor status bar with data from the specified DataView, /// if the specified DataView is active ///</summary> public void UpdateOffset(DataView dv) { if (dataBook.NPages == 0) { return; } DataView curdv = ((DataViewDisplay)dataBook.CurrentPageWidget).View; if (curdv != dv) { return; } long coffset = dv.CursorOffset; OffsetStatusbar.Pop(0); string coffsetString = BaseConverter.ConvertToString(coffset, numberBase, true, true, 1); string sizeString = BaseConverter.ConvertToString(dv.Buffer.Size - 1, numberBase, true, true, 1); string str = string.Format(Catalog.GetString("Offset: {0} / {1}"), coffsetString, sizeString); OffsetStatusbar.Push(0, str); }
///<summary> /// Updates the selection status bar with data from the specified DataView, /// if the specified DataView is active ///</summary> public void UpdateSelection(DataView dv) { if (dataBook.NPages == 0) { return; } DataView curdv = ((DataViewDisplay)dataBook.CurrentPageWidget).View; if (curdv != dv) { return; } Bless.Util.Range sel = dv.Selection; SelectionStatusbar.Pop(0); string str; if (sel.IsEmpty() == true) { str = Catalog.GetString("Selection: None"); } else { string startString = BaseConverter.ConvertToString(sel.Start, numberBase, true, true, 1); string endString = BaseConverter.ConvertToString(sel.End, numberBase, true, true, 1); string sizeString = BaseConverter.ConvertToString(sel.Size, numberBase, true, true, 1); str = string.Format(Catalog.GetString("Selection: {0} to {1}") + " " + Catalog.GetPluralString("({2} byte)", "({2} bytes)", (int)sel.Size), startString, endString, sizeString); } SelectionStatusbar.Push(0, str); }
/// <summary> /// Creates the GUI interface. /// </summary> private void CreateGui() { // Create a window SetDefaultSize(1000, 800); DeleteEvent += OnWindowDelete; // Create the window frame VBox box = new VBox(); Add(box); // Add the menu box.PackStart(CreateGuiMenu(), false, false, 0); // Create a notebook box.PackStart(demoSprites, true, true, 0); // Add the status bar statusbar = new Statusbar(); statusbar.Push(0, "Welcome!"); statusbar.HasResizeGrip = true; box.PackStart(statusbar, false, false, 0); // Show everything as the final ShowAll(); }
void SetStatusBarText(string message) { uint statusBarID = 1; statusBar.Pop(statusBarID); statusBar.Push(statusBarID, message); }
protected void SetStatusBarMessage(string message) { ThreadAssist.ProxyToMain(delegate { statusbar.Push(0, message); }); }
/// <summary> /// Constructs a demo object with the appropriate gui. /// </summary> public DemoWindow() : base("Moonfire Games' Gtk Demo") { // Create a window SetDefaultSize(1000, 800); DeleteEvent += OnWindowDelete; // Hook up the accelerator group. accelerators = new AccelGroup(); AddAccelGroup(accelerators); // Create the window frame var box = new VBox(); Add(box); // Add the status bar statusbar = new Statusbar(); statusbar.Push(0, "Welcome!"); statusbar.HasResizeGrip = true; // Create the menu menubar = new MenuBar(); // Create the editor widget. Widget editorWidget = CreateEditorWidget(); // Back everything into place. box.PackStart(CreateGuiMenu(), false, false, 0); box.PackStart(editorWidget, true, true, 0); box.PackStart(statusbar, false, false, 0); }
static void OnSelect(object obj, EventArgs args) { Gtk.Action action = actions[(Widget)obj]; if (action.Tooltip != null) { statusbar.Push(0, action.Tooltip); } }
/* Response Notifications */ public void ResponseShowForm(ResponseMethodDTO response) { if (response.ExecutionSuccess) { response.MethodResult = mainComponentBuilderForm ["vbox1"]; statusbar1.Push(0, String.Format("Welcome to Babuine Component Builder: {0}@{1}", Environment.UserName, Environment.MachineName)); } }
public MainWindow(string[] args) { Glade.XML gxml = new Glade.XML("MainWindow.glade", "EithneWindow"); gxml.BindFields(this); if (EithneWindow.Screen.RgbaColormap != null) { AlphaChannel = true; EithneWindow.Colormap = EithneWindow.Screen.RgbaColormap; } EithneWindow.IconList = new Gdk.Pixbuf[2] { new Gdk.Pixbuf(null, "icon-48.png"), new Gdk.Pixbuf(null, "icon-16.png") }; EithneWindow.DeleteEvent += OnWindowDelete; EithneWindow.Title = About.Name; StatusBar.Push(1, String.Format(Catalog.GetString("Welcome to {0}!"), About.Name)); MenuFileNew.Image = new Image(null, "document-new.png"); MenuFileNew.Activated += OnNew; MenuFileOpen.Image = new Image(null, "document-open.png"); MenuFileOpen.Activated += OnLoad; MenuFileSave.Image = new Image(null, "document-save.png"); MenuFileSave.Activated += OnSave; MenuFileSaveAs.Image = new Image(null, "document-save-as.png"); MenuFileSaveAs.Activated += OnSaveAs; MenuFilePrint.Activated += OnPrint; MenuFilePreferences.Image = new Image(null, "preferences-desktop.png"); MenuFilePreferences.Activated += delegate(object o, EventArgs eargs) { new Preferences(); }; MenuFileQuit.Image = new Image(null, "system-log-out.png"); MenuFileQuit.Activated += OnWindowDelete; MenuSystemRun.Image = new Image(null, "media-playback-start.png"); MenuSystemRun.Activated += OnRun; MenuSystemStop.Image = new Image(null, "media-playback-stop.png"); MenuSystemStop.Activated += OnRun; MenuHelpPluginList.Image = new Image(null, "plugin-16.png"); MenuHelpPluginList.Activated += delegate(object o, EventArgs eargs) { new PluginList(); }; MenuHelpAbout.Image = new Image(null, "help-browser.png"); MenuHelpAbout.Activated += delegate(object o, EventArgs eargs) { new About(); }; ToolbarNew.IconWidget = new Image(null, "document-new-22.png"); ToolbarNew.Clicked += OnNew; ToolbarOpen.IconWidget = new Image(null, "document-open-22.png"); ToolbarOpen.Clicked += OnLoad; ToolbarSave.IconWidget = new Image(null, "document-save-22.png"); ToolbarSave.Clicked += OnSave; ToolbarRun.IconWidget = new Image(null, "media-playback-start-22.png"); ToolbarRun.Clicked += OnRun; schematic = new Schematic(StatusBar); PluginToolboxSocket.AddWithViewport(new PluginToolbox(StatusBar, schematic)); SchematicSocket.AddWithViewport(schematic); engine = new Engine2(schematic, SetRunToStart, progress.Pulse); progress.PulseStep = 0.05; }
internal async void OnSync(object o, EventArgs args) { Statusbar.Push(1, "Syncing..."); try { if (Program.AnimeList != null) { await Task.Run(() => Program.AnimeList.Sync()); AnimeBox.Sync(); } } catch (Exception e) { Debug.Write(e.StackTrace); Statusbar.Pop(1); Statusbar.Push(1, $"Error: {e.InnerException?.Message ?? e.Message}"); await Task.Delay(2000); } finally { Statusbar.Pop(1); } }
protected void recognizeGesture(object sender, EventArgs e) { string statusBarMessage = ""; //Removing current message from the status bar sBar.Pop(1); //Copying the list of drawn points because of pass by reference List <PointD> tempList = new List <PointD> (); foreach (PointD pt in currentDrawnPoints) { tempList.Add(new PointD(pt.X, pt.Y)); } Tuple <string, double> result = recognizer.findMatchingTemplate(tempList); Console.WriteLine("Match: {0}, maxScore: {1}", result.Item1, (int)((result.Item2))); //Updating status bar statusBarMessage = "Match: " + result.Item1 + "\t\t Score: " + result.Item2; sBar.Push(1, statusBarMessage); }
public void SetPosition(SubtitleTextType textType, int lineNumber, int columnNumber) { //To translators: Trans corresponds to Translation (used here to denote whether text or translation is being edited). string type = (textType == SubtitleTextType.Text ? Catalog.GetString("Text") : Catalog.GetString("Trans")); //To translators: Ln corresponds to Line string line = Catalog.GetString("Ln"); //To translators: Col corresponds to Column string column = Catalog.GetString("Col"); string message = type + " " + line + " " + lineNumber + ", " + column + " " + columnNumber; ClearStatus(positionStatus); positionStatus.Push(0, message); }
///<summary> /// Updates the overwrite status bar with data from the specified DataView, /// if the specified DataView is active ///</summary> public void UpdateOverwrite(DataView dv) { if (dataBook.NPages == 0) { return; } DataView curdv = ((DataViewDisplay)dataBook.CurrentPageWidget).View; if (curdv != dv) { return; } OverwriteStatusbar.Pop(0); if (dv.Overwrite == true) { OverwriteStatusbar.Push(0, " " + Catalog.GetString("OVR")); } else { OverwriteStatusbar.Push(0, " " + Catalog.GetString("INS")); } }
protected override bool OnButtonPressEvent(Gdk.EventButton ev) { base.OnButtonPressEvent(ev); status.Pop(1); TreeIter iter; Selection.GetSelected(out iter); if (HasParent(Model, iter)) { IFactory f = Model.GetValue(iter, 1) as IFactory; status.Push(1, String.Format(Catalog.GetString("{0} plugin selected"), f.Info.Name)); if (ev.Button == 3) { Menu m = new Menu(); ImageMenuItem m1 = new ImageMenuItem(Catalog.GetString("A_dd")); m1.Image = new Image(null, "list-add.png"); m1.Activated += delegate(object sender, EventArgs e) { Plugin.Base p = f.Create(); p.Source = PluginDB.Origin[f]; schematic.Add(p); }; m.Append(m1); SeparatorMenuItem s = new SeparatorMenuItem(); m.Append(s); ImageMenuItem m2 = new ImageMenuItem(Catalog.GetString("_About")); m2.Image = new Image(null, "help-browser.png"); m2.Activated += delegate(object sender, EventArgs e) { new PluginAbout(f); }; m.Append(m2); m.ShowAll(); m.Popup(); } } return(true); }
static void statusbar_pushed(object o, EventArgs args) { string content = null; if (counter < 0) { content = String.Empty; } else { content = String.Format("Push #{0}", counter); } Console.WriteLine("Push: " + counter); context_id = statusbar.GetContextId(content); statusbar.Push(context_id, content); counter++; }
/// <summary>Crea una nueva consola y la enlaza con la pantalla</summary> /// <param name="rom">Ruta al fichero del cartucho</param> private static void iniciarConsola(String rom) { try{ // Detiene cualquier emulacion previa if (_consola != null) { _consola.parar(); _pantalla.limpiar(); } _consola = new GB(rom); _consola.graphics.pantalla = _pantalla; menuItemConsolaIniciar.Sensitive = true; menuItemConsolaDebug.Sensitive = true; statusBar.Pop(0); statusBar.Push(0, _consola.cartucho.nombre); }catch (Exception e) { perifericos.Debug.WriteLine(e.Message); perifericos.Debug.WriteLine(e.StackTrace); } }
/// <summary> /// Creates the GUI interface. /// </summary> private void CreateGui() { // Create a window SetDefaultSize(512, 512); DeleteEvent += OnWindowDelete; // Create the window frame VBox box = new VBox(); Add(box); // Add the menu box.PackStart(CreateGuiMenu(), false, false, 0); // Create a notebook box.PackStart(new Viewer(), true, true, 0); // Add the status bar statusbar = new Statusbar(); statusbar.Push(0, "Welcome!"); statusbar.HasResizeGrip = true; box.PackStart(statusbar, false, false, 0); }
//Contains all of the components which are on the window private void setupWindow() { //Vertical box (3 sections) which is the main container VBox MainVBox = new VBox(false, 6); /*********************Start of menu bar components*********************/ //Note: Flow of menus are: //Menubar contains MenuItems (e.g. File, Edit, About, etc...) //MenuItems contains one Menu (i.e. a Submenu) //Menu contains multiple MenuItems (e.g. Save, Save As, Load, etc...) MenuBar MainMenuBar = new MenuBar(); Menu FileMenu = new Menu(); MenuItem File = new MenuItem("File"); File.Submenu = FileMenu; MenuItem ExitItem = new MenuItem("Exit"); ExitItem.Activated += quitProgram; FileMenu.Append(ExitItem); Menu GestureMenu = new Menu(); MenuItem Gesture = new MenuItem("Gestures"); Gesture.Submenu = GestureMenu; MenuItem LoadGesture = new MenuItem("Load Gesture"); LoadGesture.Activated += openGesture; GestureMenu.Append(LoadGesture); MenuItem SaveGestureItem = new MenuItem("Save Gesture"); SaveGestureItem.Activated += createGesture; GestureMenu.Append(SaveGestureItem); Menu PointsMenu = new Menu(); MenuItem Points = new MenuItem("Data Points"); Points.Submenu = PointsMenu; MenuItem LoadPointsItem = new MenuItem("Load Points"); LoadPointsItem.Activated += loadDataPoints; PointsMenu.Append(LoadPointsItem); MenuItem RecordPointsItem = new MenuItem("Record Points"); RecordPointsItem.Activated += recordPoints; PointsMenu.Append(RecordPointsItem); MenuItem BatchRecognizeItem = new MenuItem("Batch Recognize"); BatchRecognizeItem.Activated += batchRecognize; PointsMenu.Append(BatchRecognizeItem); Menu HelpMenu = new Menu(); MenuItem Help = new MenuItem("Help"); Help.Submenu = HelpMenu; MenuItem AboutMenuItem = new MenuItem("About"); HelpMenu.Append(AboutMenuItem); MainMenuBar.Append(File); MainMenuBar.Append(Gesture); MainMenuBar.Append(Points); MainMenuBar.Append(Help); /*********************End of menu bar components*********************/ //Drawing area which is the core component of the application dArea = new DrawingArea(); dArea.SetSizeRequest(500, 500); //Horizontal box (4 sections) which contains all of the buttons along the //bottom of the window HBox ButtonHBox = new HBox(false, 6); /*********************Start of Buttons*********************/ Button BtnCreateGesture = new Button("Create"); Button BtnRecognizeGesture = new Button("Recognize"); Button BtnClearScreen = new Button("Clear"); Button BtnRecordPoints = new Button("Record points"); Button BtnChangeColour = new Button("Change colour"); //Button functions BtnCreateGesture.Clicked += new EventHandler(createGesture); BtnRecognizeGesture.Clicked += new EventHandler(recognizeGesture); BtnClearScreen.Clicked += new EventHandler(clearScreen); BtnRecordPoints.Clicked += new EventHandler(recordPoints); BtnChangeColour.Clicked += changeColour; //Adding buttons to the current horizontal box ButtonHBox.PackStart(BtnCreateGesture, true, false, 0); ButtonHBox.PackStart(BtnRecognizeGesture, true, false, 0); ButtonHBox.PackStart(BtnClearScreen, true, false, 0); ButtonHBox.PackStart(BtnRecordPoints, true, false, 0); ButtonHBox.PackStart(BtnChangeColour, true, false, 0); /*********************End of Buttons*********************/ //Status bar which shows the score and recognized gesture sBar = new Statusbar(); sBar.Push(1, "Ready"); //Entry box for batch function name to be used on the files batchFunctionName = new Entry("Recorded points function name"); batchFunctionName.AddEvents( (int)Gdk.EventMask.ButtonPressMask ); batchFunctionName.ButtonPressEvent += clearTextBox; //Adding all components to the Vertical box MainVBox.PackStart(MainMenuBar, false, false, 0); MainVBox.PackStart(dArea, false, false, 0); MainVBox.PackStart(ButtonHBox, false, false, 0); MainVBox.PackStart(batchFunctionName, false, false, 0); MainVBox.PackStart(sBar, false, false, 0); Add(MainVBox); ShowAll(); //Surface 'pattern' for area to be covered surface = new ImageSurface(Format.Argb32, 500, 500); //Adding mouse events to the drawing area and assigning functions dArea.AddEvents( //Mouse Related Events (int)Gdk.EventMask.PointerMotionMask | (int)Gdk.EventMask.ButtonPressMask | (int)Gdk.EventMask.ButtonReleaseMask ); //Repaint the Canvas Internally. dArea.ExposeEvent += OnDrawingAreaExposed; //Do this on MousePress inside Area dArea.ButtonPressEvent += OnMousePress; //Do this on MouseReleased inside Area dArea.ButtonReleaseEvent += OnMouseRelease; //Do this if a Motion Occurs inside the Drawing Area dArea.MotionNotifyEvent += OnMouseMotion2; //Assigning close function to the window DeleteEvent += delegate { Application.Quit(); }; //Checking to see if bool for using the dot function is true //And assigning the required function as the delegate's operation //Note: This will always be true, no current way to switch while //application is running, has not been needed as of yet if (isDot) { Painter = new DrawShape(DrawDot); myoPainter = new DrawShape(DrawDot); } else { Painter = new DrawShape(DrawLine); } }
protected override bool OnMotionNotifyEvent(Gdk.EventMotion args) { if (Action.m == Action.Mode.Normal) { object oldselected = selected; selected = CheckSelection((int)args.X, (int)args.Y); if (oldselected != selected) { status.Pop(1); if (selected is Block) { status.Push(1, String.Format(Catalog.GetString("{0} block selected"), (selected as Block).Plugin.Info.Name)); } else if (selected is Socket) { Socket s = selected as Socket; Plugin.Base p = s.Parent.Plugin; if (s.Type == Socket.T.In) { status.Push(1, String.Format(Catalog.GetString("{0} block, input socket {1}. {2}"), p.Info.Name, s.Num, p.DescIn(s.Num))); } else { status.Push(1, String.Format(Catalog.GetString("{0} block, output socket {1}. {2}"), p.Info.Name, s.Num, p.DescOut(s.Num))); } } QueueDraw(); } } else if (Action.m == Action.Mode.Move) { int dx = (int)args.X - tmpx; int dy = (int)args.Y - tmpy; (selected as Block).Move(dx, dy); QueueDraw(); tmpx = (int)args.X; tmpy = (int)args.Y; } else if (Action.m == Action.Mode.Connect) { tmpx = (int)args.X; tmpy = (int)args.Y; object tmp = CheckSelection((int)args.X, (int)args.Y); if (tmp is Socket) { Action.data = CheckConnection(selected as Socket, tmp as Socket); } else { Action.data = Connection.None; } QueueDraw(); } return(true); }
void SetStatusBarMessage(Statusbar statusBarPanel, string message) { statusBarPanel.Pop(0); statusBarPanel.Push(0, message); }
/// <summary> /// Constructs a demo object with the appropriate gui. /// </summary> public DemoWindow() : base("Moonfire Games' Gtk Demo") { // Create a window SetDefaultSize(1000, 800); DeleteEvent += OnWindowDelete; demoComponents = new DemoComponents(); // Create a user action manager. var actionManager = new ActionManager(this); actionManager.Add(GetType().Assembly); demoConfiguratorsTab = new DemoConfiguratorsTab(this); actionManager.Add(demoConfiguratorsTab); demoActions = new DemoActions(actionManager); // Load the layout from the file system. layout = new ActionLayout(new FileInfo("ActionLayout1.xml")); actionManager.SetLayout(layout); // Load the keybinding from a file. keybindings = new ActionKeybindings(new FileInfo("ActionKeybindings1.xml")); actionManager.SetKeybindings(keybindings); // Create the window frame var box = new VBox(); Add(box); // Create the components we need before the menu. notebook = new Notebook(); actionManager.Add(new SwitchPageAction(notebook, 0, "Components")); actionManager.Add(new SwitchPageAction(notebook, 1, "Text Editor")); actionManager.Add(new SwitchPageAction(notebook, 2, "Actions")); actionManager.Add(new SwitchPageAction(notebook, 3, "Configurators")); // Create a notebook notebook.BorderWidth = 5; notebook.AppendPage(demoComponents, new Label("Components")); notebook.AppendPage(demoActions, new Label("Actions")); notebook.AppendPage(demoConfiguratorsTab, new Label("Configurators")); // Add the status bar statusbar = new Statusbar(); statusbar.Push(0, "Welcome!"); statusbar.HasResizeGrip = true; // Create the menu menubar = new MenuBar(); // Back everything into place. box.PackStart(CreateGuiMenu(), false, false, 0); box.PackStart(notebook, true, true, 0); box.PackStart(statusbar, false, false, 0); }
private SharpMusique(string [] args) { int i; string strPath; TreeViewColumn tvc; CellRenderer rendr; string [] strColumns = new string[] { "Title", "Artist", "Album", "Time", "Price" }; string [] strCWidths = new string[] { "260", "190", "180", "70", "70" }; if (Environment.OSVersion.ToString().IndexOf("Unix") != -1) { strHomeDir = Environment.GetEnvironmentVariable("HOME"); strSongDir = Path.Combine(strHomeDir, "Music"); strDataDir = Path.Combine(strHomeDir, ".SharpMusique"); } else { strHomeDir = Environment.GetFolderPath( Environment.SpecialFolder.ApplicationData); strSongDir = Environment.GetFolderPath( Environment.SpecialFolder.MyMusic); strDataDir = Path.Combine(strHomeDir, "SharpMusique"); } Utility.CreateDirectory(strDataDir); strPath = Path.Combine(strDataDir, "songdir"); if (File.Exists(strPath)) { StreamReader sr = new StreamReader(strPath); strSongDir = sr.ReadToEnd().Trim(); sr.Close(); } Utility.CreateDirectory(strSongDir); strPath = Path.Combine(strDataDir, "cwidths"); if (File.Exists(strPath)) { StreamReader sr = new StreamReader(strPath); string [] strTmp = sr.ReadToEnd().Split(','); sr.Close(); if (strTmp.Length == strCWidths.Length) { strCWidths = strTmp; } } Application.Init(); Glade.XML gxml = new Glade.XML(null, "SharpMusique.glade", "MainWindow", null); gxml.Autoconnect(this); MainWindow.Icon = new Gdk.Pixbuf(null, "sharpmusique.png"); songls = new ListStore(GType.String, GType.String, GType.String, GType.String, GType.String, GType.Int); songtv.Model = songls; songtv.HeadersClickable = true; songtv.Selection.Changed += new EventHandler(OnTreeViewSelection); for (i = 0; i < strColumns.Length; i++) { tvc = new TreeViewColumn(); rendr = new CellRendererText(); tvc.Title = strColumns[i]; tvc.PackStart(rendr, true); tvc.AddAttribute(rendr, "text", i); tvc.Sizing = TreeViewColumnSizing.Fixed; tvc.FixedWidth = Convert.ToInt32(strCWidths[i]); tvc.Resizable = true; tvc.SortColumnId = i; songtv.AppendColumn(tvc); } strPath = Path.Combine(strDataDir, "country"); if (File.Exists(strPath)) { StreamReader sr = new StreamReader(strPath); strCountry = sr.ReadToEnd().Trim(); sr.Close(); } SList group = new SList(IntPtr.Zero); Menu cmenu = new Menu(); micountry.Submenu = cmenu; string [] countries = FairStore.Countries.AllKeys; for (i = 0; i < countries.Length; i++) { RadioMenuItem rmi = new RadioMenuItem(group, countries[i]); rmi.Toggled += new EventHandler(OnCountrySelect); rmi.Name = countries[i]; if ((((i + 1) == countries.Length) && (strCountry == null)) || countries[i].Equals(strCountry)) { rmi.Active = true; } group = rmi.Group; cmenu.Append(rmi); rmi.Show(); } mipending.Sensitive = false; mipepsicap.Sensitive = false; migiftcert.Sensitive = false; mipreview.Sensitive = false; mipurchase.Sensitive = false; mipurchasealbum.Sensitive = false; miviewalbum.Sensitive = false; cidStatus = sbar.GetContextId("Status"); cidProgress = sbar.GetContextId("Progress"); sbar.Push(cidStatus, "Not Logged In"); mutex = new Mutex(); Application.Run(); }
new protected void InitUI() { VBox vbox = new VBox(false, 1); //ScrolledWindow ScrolledWindow scrolledWindowProfile = new ScrolledWindow(); scrolledWindowProfile.ShadowType = ShadowType.EtchedIn; scrolledWindowProfile.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); //StatusBar if (_showStatusBar) { _statusbar = new Statusbar() { HasResizeGrip = false }; _statusbar.Push(0, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_statusbar")); } ; //Treeview TreeView = new TreeView(_listStoreModelFilterSort); //_treeView.RulesHint = true; TreeView.EnableSearch = true; TreeView.SearchColumn = 1; TreeView.ModifyCursor(new Gdk.Color(100, 100, 100), new Gdk.Color(200, 200, 200)); //Add Columns AddColumns(); //Navigator Navigator = new GenericTreeViewNavigator <XPCollection, XPGuidObject>(_sourceWindow, this, _navigatorMode); //TODO:THEME //if (GlobalApp.ScreenSize.Width >= 800) //{ TouchButtonIconWithText buttonApplyPrivileges = Navigator.GetNewButton("touchButtonApplyPrivileges_DialogActionArea", resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_user_apply_privileges"), @"Icons/icon_pos_nav_refresh.png"); //buttonApplyPrivileges.WidthRequest = 110; //Apply Permissions buttonApplyPrivileges.Sensitive = FrameworkUtils.HasPermissionTo("BACKOFFICE_MAN_USER_PRIVILEGES_APPLY"); //Event buttonApplyPrivileges.Clicked += delegate { GlobalApp.WindowBackOffice.Accordion.UpdateMenuPrivileges(); //Force Update MainWindow Pos Privilegs ex TollBar Buttons etc GlobalApp.WindowPos.TicketList.UpdateTicketListButtons(); }; //Add to Extra Slot Navigator.ExtraSlot.PackStart(buttonApplyPrivileges, false, false, 0); //} //Pack components scrolledWindowProfile.Add(TreeView); HBox hbox = new HBox(false, 1); hbox.PackStart(scrolledWindowProfile); vbox.PackStart(hbox, true, true, 0); vbox.PackStart(Navigator, false, false, 0); if (_showStatusBar) { vbox.PackStart(_statusbar, false, false, 0); } //Final Pack PackStart(vbox); //Required Always Start in First Record, and get Iter XPGuidObject, Ready for Update Action try { if (_dataSource.Count > 0) { TreeView.Model.GetIterFirst(out _treeIter); _treePath = ListStoreModelFilter.GetPath(_treeIter); TreeView.SetCursor(_treePath, null, false); _dataSourceRow = (sys_userprofile)_dataSource.Lookup(new Guid(Convert.ToString(TreeView.Model.GetValue(_treeIter, _modelFirstCustomFieldIndex)))); } } catch (Exception ex) { _log.Error(ex.Message, ex); } //Events TreeView.CursorChanged += _treeView_CursorChanged; TreeView.RowActivated += delegate { Update(); }; TreeView.Vadjustment.ValueChanged += delegate { UpdatePages(); }; TreeView.Vadjustment.Changed += delegate { UpdatePages(); }; //**************************************************************************** _treeViewPermissionItem.Model = _listStoreModelPermissionItem; TreeViewColumn tmpColId = _treeViewPermissionItem.AppendColumn("ID", new CellRendererText(), "text", 0); tmpColId.Visible = false; TreeViewColumn tmpColProperty = _treeViewPermissionItem.AppendColumn(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_privilege_property"), new CellRendererText() { FontDesc = _fontDesc }, "text", 1); //Config Column Title Label labelPropertyTitle = new Label(tmpColProperty.Title); labelPropertyTitle.Show(); labelPropertyTitle.ModifyFont(_fontDescTitle); tmpColProperty.Widget = labelPropertyTitle; TreeViewColumn tmpColActivo = _treeViewPermissionItem.AppendColumn(resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_privilege_active"), _cellRendererTogglePermissionItem, "active", 2); tmpColActivo.MaxWidth = 100; //Config Column Title Label labelActivoTitle = new Label(tmpColActivo.Title); labelActivoTitle.Show(); labelActivoTitle.ModifyFont(_fontDescTitle); tmpColActivo.Widget = labelActivoTitle; //Event _cellRendererTogglePermissionItem.Toggled += ToggleEvent; ScrolledWindow scrolledWindowPermissionItem = new ScrolledWindow() { WidthRequest = 500 }; scrolledWindowPermissionItem.Add(_treeViewPermissionItem); hbox.Add(scrolledWindowPermissionItem); }
/// <summary>Write message on main windows's statusbar</summary> public void PrintStatus(string message) { sbMain.Remove(printStatusContextID, printStatusMessageID); sbMain.Push(printStatusContextID, message); }
///<summary>Displays a message in the infobar (for 5 sec)</summary> public void DisplayMessage(string message) { MessageStatusbar.Pop(0); MessageStatusbar.Push(0, message); GLib.Timeout.Add(5000, ClearStatusMessage); }
public void StatusMessage(string msg) { statusbar.Push(messageIndx++, msg); }
void UpdateStatus() { statusbar.Pop(0); statusbar.Push(0, String.Format(fmt, row, column, count)); }
public void LinkMessage(object o, EventArgs args) { sb.Push(1, web.LinkMessage); }