private CreateReportDialog(Builder builder) : base(builder.GetObject("CreateReportDialog").Handle) { builder.Autoconnect(this); DefaultResponse = ResponseType.Cancel; Response += Dialog_Response; buttonAddParticipant.Clicked += ButtonAddParticipant_Clicked; buttonAddDecision.Clicked += ButtonAddDecision_Clicked; nodeStoreParticiapnts = new NodeStore(typeof(ParticipantModel)); nodeStoreParticiapnts.AddNode(new ParticipantModel() { Fake = true }); nodeStoreDecisions = new NodeStore(typeof(DecisionModel)); nodeStoreDecisions.AddNode(new DecisionModel() { Fake = true }); nodeViewParticiapnts = new NodeView(nodeStoreParticiapnts); nodeViewParticiapnts.AppendColumn("Name", new CellRendererText(), "text", 0); alignmentParticiapnts.Add(nodeViewParticiapnts); nodeViewParticiapnts.ShowAll(); nodeViewDecisions = new NodeView(nodeStoreDecisions); nodeViewDecisions.AppendColumn("Problem", new CellRendererText(), "text", 0); nodeViewDecisions.AppendColumn("Solution", new CellRendererText(), "text", 1); nodeViewDecisions.AppendColumn("Responsible", new CellRendererText(), "text", 2); nodeViewDecisions.AppendColumn("ControlDate", new CellRendererText(), "text", 3); alignmentDecisions.Add(nodeViewDecisions); nodeViewDecisions.ShowAll(); }
/// <summary> /// Creates the node view. /// </summary> void CreateNodeView() { QuestionNodeView = new NodeView(Store); QuestionNodeView.Reorderable = true; this.Add(QuestionNodeView); QuestionNodeView.AppendColumn("Frage", new CellRendererTextEditable(Store, Question.Constants.Quest), "text", 0); QuestionNodeView.AppendColumn("Antwort", new CellRendererTextEditable(Store, Question.Constants.Answer), "text", 1); QuestionNodeView.AppendColumn("Category", new CellRendererTextEditable(Store, Question.Constants.Category), "text", 2); QuestionNodeView.AppendColumn("Anzahl", new CellRendererTextEditable(Store, Question.Constants.HowOftenAsk), "text", 3); QuestionNodeView.AppendColumn("Schwierigkeit", new CellRendererTextEditable(Store, Question.Constants.DifficultyLevel), "text", 4); foreach (var col in QuestionNodeView.Columns) { //col.SortIndicator = true; //col.SortOrder = SortType.Descending; col.Clickable = true; col.Resizable = true; col.Clicked += HandleColumnClicked; //col.Reorderable = true; } QuestionNodeView.ShowAll(); }
void InitializeComponent() { nodeView = new NodeView(); Store = new NodeStore(typeof(BatchDownloadNode)); nodeView.NodeStore = Store; // working around bug #51688 (https://bugzilla.xamarin.com/show_bug.cgi?id=51688) typeof(NodeView).GetField("store", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(nodeView, Store); var renderer = new CellRendererToggle(); renderer.Activatable = true; renderer.Toggled += RendererOnToggled; nodeView.AppendColumn("Checked", renderer, "active", 0); nodeView.AppendColumn("URL", new CellRendererText(), "text", 1); VBox.PackStart(nodeView, true, true, 0); cbStartNow = new CheckButton(); cbStartNow.Label = "Start Now?"; VBox.PackStart(cbStartNow, false, false, 0); AddButton("Ok", ResponseType.Ok); AddButton("Cancel", ResponseType.Cancel); DefaultResponse = ResponseType.Cancel; Response += (o, args) => { if (args.ResponseId == ResponseType.Ok) { BtnOk_Click(o, args); } else { BtnCancel_Click(o, args); } }; ShowAll(); }
private void InitLinksNodeView(Gtk.ListStore store, NodeView nodeView) { nodeView.Model = store; nodeView.AppendColumn("Icon", new Gtk.CellRendererPixbuf(), "pixbuf", 0); CellRendererText websiteLinkRenderer = new CellRendererText(); websiteLinkRenderer.WrapMode = Pango.WrapMode.Word; TreeViewColumn websiteColumn = nodeView.AppendColumn("Website Link", websiteLinkRenderer); websiteColumn.SetCellDataFunc(websiteLinkRenderer, new TreeCellDataFunc(RenderWebsiteLink)); nodeView.RowActivated += OpenWebsiteLink; }
protected void InitializeWidgets() { store = new NodeStore(typeof(SegmentedNode)); // Creamos el NodeView, podría hacerse en el fichero de Glade, // aunque alguna razón habría por la que se hizo así. treeview = new NodeView(store); treeview.RulesHint = true; treeview.ShowExpanders = true; treeview.AppendColumn("Imagen", new CellRendererText(), "text", 0); CellRendererText cellRenderer = new CellRendererText(); cellRenderer.Xalign = 0.5f; treeview.AppendColumn("Etiqueta", cellRenderer, "text", 1); treeview.AppendColumn("Posición", new CellRendererText(), "text", 2); scrolledtree.Add(treeview); foreach (TreeViewColumn col in treeview) { col.Sizing = TreeViewColumnSizing.Autosize; } // Asignamos el evento para cuando se produzca la selección de un // nodo en el árbol. treeview.NodeSelection.Changed += OnTreeviewSelectionChanged; treeview.ButtonPressEvent += new ButtonPressEventHandler(OnTreeviewButtonPress); imageAreaOriginal = new ImageArea(); imageAreaOriginal.ImageMode = ImageAreaMode.Zoom; frameOriginal.Add(imageAreaOriginal); imageAreaNode = new ImageArea(); imageAreaNode.ImageMode = ImageAreaMode.Zoom; frameNodeActual.Add(imageAreaNode); learnImageItem.Image = ImageResources.LoadImage("database16"); }
public static void PrepareTreeViewForStatisticsDisplay(NodeView view) { view.AppendColumn("Description", new Gtk.CellRendererText(), delegate(TreeViewColumn column, CellRenderer cell, ITreeNode treeNode) { StatisticsNode node = (StatisticsNode)treeNode; ((CellRendererText)cell).Text = node.Description; }); view.AppendColumn("Object count", new Gtk.CellRendererText(), delegate(TreeViewColumn column, CellRenderer cell, ITreeNode treeNode) { StatisticsNode node = (StatisticsNode)treeNode; ((CellRendererText)cell).Text = node.ItemsCount.ToString(); }); view.AppendColumn("Allocated bytes", new Gtk.CellRendererText(), delegate(TreeViewColumn column, CellRenderer cell, ITreeNode treeNode) { StatisticsNode node = (StatisticsNode)treeNode; ((CellRendererText)cell).Text = node.AllocatedBytes.ToString(); }); view.NodeStore = new Gtk.NodeStore(typeof(StatisticsNode)); }
public StationDialog(Stations stations, Station station) { glade = new Glade.XML(null, "radio.glade", "StationDialog", "banshee"); glade.Autoconnect(this); dialog = (Dialog)glade.GetWidget("StationDialog"); Banshee.Base.IconThemeUtils.SetWindowIcon(dialog); if (station == null) { is_new = true; station = new Station(); } this.stations = stations; this.station = station; link_store = new LinkStore(station); view = new NodeView(link_store); view.HeadersVisible = true; CellRendererToggle active_renderer = new CellRendererToggle(); active_renderer.Activatable = true; active_renderer.Radio = true; active_renderer.Toggled += OnLinkToggled; view.AppendColumn(Catalog.GetString("Active"), active_renderer, ActiveDataFunc); view.AppendColumn(Catalog.GetString("Type"), new CellRendererText(), TypeDataFunc); view.AppendColumn(Catalog.GetString("Title"), EditTextRenderer(), "text", 1); view.AppendColumn(Catalog.GetString("URI"), EditTextRenderer(), "text", 2); view.Show(); (glade["link_view_container"] as ScrolledWindow).Add(view); group_combo = ComboBoxEntry.NewText(); group_combo.Show(); (glade["group_combo_container"] as Box).PackStart(group_combo, true, true, 0); title_entry.Text = station.Title == null ? String.Empty : station.Title; description_entry.Text = station.Description == null ? String.Empty : station.Description; group_combo.Entry.Text = station.Group == null ? String.Empty : station.Group; foreach (string group in stations.Groups) { group_combo.AppendText(group); } }
private void populateNodeview(NodeView nodeView, List <Invoice> invoices) { var nodeStore = new NodeStore(typeof(InvoiceNode)); nodeView.NodeStore = nodeStore; //workaround for bug (not setting NodeStore) typeof(NodeView).GetField("store", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(nodeView, nodeStore); foreach (var invoice in invoices) { nodeView.NodeStore.AddNode(new InvoiceNode(invoice)); } nodeView.AppendColumn("Invoice number", new CellRendererText(), "text", 0); nodeView.AppendColumn("Invoice date", new CellRendererText(), "text", 1); nodeView.AppendColumn("Maturity date", new CellRendererText(), "text", 2); nodeView.AppendColumn("Total price", new CellRendererText(), "text", 3); }
internal ProjectView() { componentNodeStore = new NodeStore(typeof(GenericNode)); componentNodeView = new NodeView(componentNodeStore); componentNodeView.AppendColumn("Project Tree", new CellRendererText(), "text", 0); componentScrolledWindow = new ScrolledWindow(); componentScrolledWindow.Add(componentNodeView); componentNodeView.NodeSelection.Mode = SelectionMode.Single; componentNodeView.NodeSelection.Changed += new EventHandler(OnSelectionChanged); }
public void Construir(bool bTabelaDir, NodeView lvTabela) { ListStore lstore; TreeViewColumn tvColuna; CellRendererPixbuf pixbufRender; CellRendererText tvcolunaCell; tvColuna = new TreeViewColumn(); tvColuna.Title = "Nome"; pixbufRender = new CellRendererPixbuf(); tvColuna.PackStart(pixbufRender, false); tvColuna.AddAttribute(pixbufRender, "pixbuf", 0); tvcolunaCell = new CellRendererText(); tvColuna.PackStart(tvcolunaCell, true); tvColuna.AddAttribute(tvcolunaCell, "text", 1); lvTabela.AppendColumn(tvColuna); lvTabela.AppendColumn("Tamanho", new Gtk.CellRendererText(), "text", 2); lvTabela.AppendColumn("Tipo", new Gtk.CellRendererText(), "text", 3); lvTabela.AppendColumn("Modificado", new Gtk.CellRendererText(), "text", 4); lvTabela.AppendColumn("Atributos", new Gtk.CellRendererText(), "text", 5); lvTabela.AppendColumn("Caminho", new Gtk.CellRendererText(), "text", 6); int[] tamanhos = new int[] { 300, 100, 70, 120, 90, 300 }; for (int i = 0; i < tamanhos.Length; i++) { //lvTabela.Columns[i].MinWidth = tamanhos[i]; lvTabela.Columns[i].SortColumnId = i + 1; lvTabela.Columns[i].Resizable = true; lvTabela.Columns[i].Sizing = TreeViewColumnSizing.Autosize; } if (bTabelaDir) { lstore = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string)); } else { lvTabela.AppendColumn("Aba", new Gtk.CellRendererText(), "text", 7); //lvTabela.Columns[6].MinWidth = 150; lvTabela.Columns[6].SortColumnId = 7; lvTabela.Columns[6].Resizable = true; lvTabela.Columns[6].Sizing = TreeViewColumnSizing.Autosize; lstore = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string)); } lvTabela.Selection.Mode = SelectionMode.Single; lvTabela.Model = lstore; lvTabela.ColumnsAutosize(); }
public NodeViewDemo() : base("NodeView demo") { DeleteEvent += new DeleteEventHandler(DeleteCB); DefaultSize = new Gdk.Size(640, 480); ScrolledWindow sw = new ScrolledWindow(); Add(sw); NodeView view = new NodeView(Store); view.HeadersVisible = true; view.AppendColumn("Name", new CellRendererText(), "text", 0); view.AppendColumn("Type", new CellRendererText(), new NodeCellDataFunc(DataCallback)); sw.Add(view); dialog.Destroy(); dialog = null; }
// readonly Label errorLabel = new Label ("Errors") { // Justify = Justification.Left, // }; public MainPadControl() { Env.LinkedMonitoredCode += Env_LinkedMonitoredCode; runButton.Clicked += RunButton_Clicked; refreshButton.Clicked += RefreshButton_Clicked; stopButton.Clicked += StopButton_Clicked; clearButton.Clicked += ClearButton_Clicked; dependenciesView = new NodeView(dependenciesStore); dependenciesView.AppendColumn("Dependency", new CellRendererText(), "text", 0); dependenciesView.AppendColumn("Status", new CellRendererText(), "text", 1); toolbar.PackStart(runButton, false, false, 4); toolbar.PackStart(refreshButton, false, false, 4); toolbar.PackStart(stopButton, false, false, 4); toolbar.PackEnd(clearButton, false, false, 4); PackStart(toolbar, false, false, 0); // PackStart (errorLabel, false, false, 8); PackEnd(dependenciesView, true, true, 0); }
/// <summary> /// Inicializa los controles del panel del asistente. /// </summary> /// <param name="imagesStore"> /// El almacén de imagenes creado en el paso anterior, para que las /// imagenes sean seleccionables en la vista de previsualización. /// </param> private void InitializeWidgets(ListStore imagesStore) { NodeStore store = new NodeStore(typeof(BitmapProcessNode)); processesView = new NodeView(store); processesView.ShowExpanders = false; processesView.RulesHint = true; processesView.NodeSelection.Changed += OnProcessesSelectionChanged; processesView.AppendColumn("Algoritmo", new CellRendererText(), "text", 0); processesView.AppendColumn("Parámetros", new CellRendererText(), "text", 1); bitmapsProcessSW.Add(processesView); originIA = new ImageArea(); processedIA = new ImageArea(); originIA.ImageMode = ImageAreaMode.Zoom; processedIA.ImageMode = ImageAreaMode.Zoom; originFrame.Add(originIA); processedFrame.Add(processedIA); imagesTV.Model = imagesStore; imagesTV.AppendColumn("Imagen", new CellRendererText(), "text", 1); imagesTV.Selection.Changed += OnImagesTVSelectionChanged; LoadDefaults(); }
public MainPadControl() { mainScheduler = TaskScheduler.FromCurrentSynchronizationContext(); hostEntry.Entry.Text = ContinuousEnv.Shared.IP; PopulateHostEntry(); Env.LinkedMonitoredCode += Env_LinkedMonitoredCode; Env.Failure += Env_Alerted; Env.Success += Env_Success; Env.Discovery.DevicesChanged += Discovery_DevicesChanged; runButton.Clicked += RunButton_Clicked; refreshButton.Clicked += RefreshButton_Clicked; stopButton.Clicked += StopButton_Clicked; clearButton.Clicked += ClearButton_Clicked; hostEntry.Changed += HostEntry_Changed; //portEntry.Changed += PortEntry_Changed; dependenciesView = new NodeView(dependenciesStore); dependenciesView.AppendColumn("Dependency", new CellRendererText(), "text", 0); dependenciesView.AppendColumn("Status", new CellRendererText(), "text", 1); toolbar0.PackStart(runButton, false, false, 4); toolbar0.PackStart(refreshButton, false, false, 4); toolbar0.PackStart(stopButton, false, false, 4); toolbar0.PackEnd(clearButton, false, false, 4); toolbar1.PackStart(hostLabel, false, false, 4); toolbar1.PackStart(hostEntry, false, false, 4); toolbar2.AddWithViewport(alertLabel); //toolbar1.PackStart (portLabel, false, false, 4); //toolbar1.PackStart (portEntry, false, false, 4); toolbar.PackStart(toolbar0, false, false, 0); toolbar.PackStart(toolbar1, false, false, 0); toolbar.PackStart(toolbar2, false, false, 0); PackStart(toolbar, false, false, 0); PackEnd(dependenciesView, true, true, 0); }
public MainWindow() : base(Gtk.WindowType.Toplevel) { Build(); store = new Gtk.NodeStore(typeof(MyTreeNode)); store.AddNode(new MyTreeNode("Item A")); store.AddNode(new MyTreeNode("Item B")); store.AddNode(new MyTreeNode("Item C")); myNodeView = new NodeView(store); myNodeView.ButtonPressEvent += new ButtonPressEventHandler(OnItemButtonPressed); myNodeView.AppendColumn("Deletable items", new Gtk.CellRendererText(), "text", 0); myNodeView.ShowAll(); Add(myNodeView); }
private NodeView CreateNodeView <TModel>() where TModel : ITreeNode { var modelType = typeof(TModel); var store = new NodeStore(modelType); var nodeView = new NodeView(store) { }; var bindingProperties = modelType.GetProperties() .Select(p => new { prop = p, column = p.GetCustomAttributes(false).OfType <TreeNodeValueAttribute>().SingleOrDefault()?.Column ?? -1, name = p.Name }) .Where(p => p.column >= 0) .OrderBy(p => p.column); foreach (var property in bindingProperties) { var cellRender = new CellRendererText() { Editable = true }; var prop = property; cellRender.Edited += (o, args) => { var node = store.GetNode(new TreePath(args.Path)); prop.prop.SetValue(node, args.NewText); }; var coll = nodeView.AppendColumn(prop.name, cellRender, "text", prop.column); coll.Resizable = true; coll.Expand = true; } return(nodeView); }
/// <summary> /// Initializes the child widgets of the widget. /// </summary> private void InitializeWidgets() { syntacticalCoverModel = new NodeStore(typeof(SyntacticalCoverNode)); syntacticalCoverTree = new NodeView(syntacticalCoverModel); syntacticalCoverTree.RulesHint = true; syntacticalCoverTree.AppendColumn("Elemento de análisis", new CellRendererText(), "markup", 0); syntacticalCoverTree.RowActivated += new RowActivatedHandler(OnSyntacticalCoverTreeRowActivated); syntacticalCoverTree.Selection.Changed += new EventHandler(OnSyntacticalCoverTreeSelectionChanged); //syntacticalCoverTree.ShowExpanders = false; syntacticalTreePlaceholder.Add(syntacticalCoverTree); remainingItemsStore = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(Token)); remainingItemsIconView.Model = remainingItemsStore; remainingItemsIconView.PixbufColumn = 0; remainingItemsIconView.TextColumn = 1; originalImageArea = new ImageArea(); originalImageArea.ImageMode = ImageAreaMode.Zoom; synImageOriginalPlaceholder.Add(originalImageArea); originalImageArea.ShowAll(); }
public Toolbox(ServiceContainer parentServices) { this.parentServices = parentServices; //we need this service, so create it if not present toolboxService = parentServices.GetService(typeof(IToolboxService)) as ToolboxService; if (toolboxService == null) { toolboxService = new ToolboxService(); parentServices.AddService(typeof(IToolboxService), toolboxService); } #region Toolbar toolbar = new Toolbar(); toolbar.ToolbarStyle = ToolbarStyle.Icons; toolbar.IconSize = IconSize.SmallToolbar; base.PackStart(toolbar, false, false, 0); filterToggleButton = new ToggleToolButton(); filterToggleButton.IconWidget = new Image(Stock.MissingImage, IconSize.SmallToolbar); filterToggleButton.Toggled += new EventHandler(toggleFiltering); toolbar.Insert(filterToggleButton, 0); catToggleButton = new ToggleToolButton(); catToggleButton.IconWidget = new Image(Stock.MissingImage, IconSize.SmallToolbar); catToggleButton.Toggled += new EventHandler(toggleCategorisation); toolbar.Insert(catToggleButton, 1); SeparatorToolItem sep = new SeparatorToolItem(); toolbar.Insert(sep, 2); filterEntry = new Entry(); filterEntry.WidthRequest = 150; filterEntry.Changed += new EventHandler(filterTextChanged); #endregion scrolledWindow = new ScrolledWindow(); base.PackEnd(scrolledWindow, true, true, 0); //Initialise model store = new ToolboxStore(); //initialise view nodeView = new NodeView(store); nodeView.Selection.Mode = SelectionMode.Single; nodeView.HeadersVisible = false; //cell renderers CellRendererPixbuf pixbufRenderer = new CellRendererPixbuf(); CellRendererText textRenderer = new CellRendererText(); textRenderer.Ellipsize = Pango.EllipsizeMode.End; //Main column with text, icons TreeViewColumn col = new TreeViewColumn(); col.PackStart(pixbufRenderer, false); col.SetAttributes(pixbufRenderer, "pixbuf", ToolboxStore.Columns.Icon, "visible", ToolboxStore.Columns.IconVisible, "cell-background-gdk", ToolboxStore.Columns.BackgroundColour); col.PackEnd(textRenderer, true); col.SetAttributes(textRenderer, "text", ToolboxStore.Columns.Label, "weight", ToolboxStore.Columns.FontWeight, "cell-background-gdk", ToolboxStore.Columns.BackgroundColour); nodeView.AppendColumn(col); //Initialise self scrolledWindow.VscrollbarPolicy = PolicyType.Automatic; scrolledWindow.HscrollbarPolicy = PolicyType.Never; scrolledWindow.WidthRequest = 150; scrolledWindow.AddWithViewport(nodeView); //selection events nodeView.NodeSelection.Changed += OnSelectionChanged; nodeView.RowActivated += OnRowActivated; //update view when toolbox service updated toolboxService.ToolboxChanged += new EventHandler(tbsChanged); Refresh(); //track expanded state of nodes nodeView.RowCollapsed += new RowCollapsedHandler(whenRowCollapsed); nodeView.RowExpanded += new RowExpandedHandler(whenRowExpanded); //set initial state filterToggleButton.Active = false; catToggleButton.Active = true; }
/// <summary> /// Initialize the widget's children widgets. /// </summary> private void InitializeWidgets() { this.Add(tokenizingStageWidgetBase); sequencesModel = new NodeStore(typeof(SequenceNode)); sequencesNV = new NodeView(sequencesModel); sequencesNV.ShowExpanders = true; sequencesNV.RulesHint = true; sequencesNVPlaceholder.Add(sequencesNV); sequencesNV.AppendColumn("Secuencia", new CellRendererText(), "text", 0); sequencesNV.AppendColumn("Símbolos", new CellRendererText(), "text", 1); sequencesNV.AppendColumn("Ítem", new CellRendererText(), "text", 2); // We tell the treeview's columns to resize automatically. foreach (TreeViewColumn column in sequencesNV.Columns) { column.Sizing = TreeViewColumnSizing.Autosize; } // We handle the pressing of the mouse buttons, so we can show // the contextual menu. sequencesNV.Events = Gdk.EventMask.ButtonPressMask; sequencesNV.ButtonPressEvent += new ButtonPressEventHandler(OnSequencesNVButtonPress); symbolsModel = new ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(Token)); symbolsIV.Model = symbolsModel; symbolsIV.TextColumn = 1; symbolsIV.PixbufColumn = 0; baselineImageArea = new ImageArea(); baselineImageArea.ImageMode = ImageAreaMode.Zoom; currentImageFrm.Add(baselineImageArea); sequenceMatchingImageArea = new ImageArea(); sequenceMatchingImageArea.ImageMode = ImageAreaMode.Zoom; sequenceImageFrm.Add(sequenceMatchingImageArea); tokenizingRulesTV.AppendColumn("Item generado", new CellRendererText(), "text", 0); tokenizingRulesTV.AppendColumn("Expresión", new CellRendererText(), "text", 1); tokenizingRulesTV.Columns[0].Sizing = TreeViewColumnSizing.Autosize; tokenizingRulesTV.Columns[1].Sizing = TreeViewColumnSizing.Autosize; tokenizingButtonsNB.Page = 0; tokenizingStepsNB.Page = 0; tokenizingStageWidgetBase.ShowAll(); }
public MainWindow() : base(WindowType.Toplevel) { VBox mainVBox = new VBox(false, 0); HBox nodeViewHBox = new HBox(true, 0); HBox crudButtonsHBox = new HBox(true, 0); HBox transactionContolButtonsHBox = new HBox(true, 0); Button refreshButton = new Button("Refresh"); Button createButton = new Button("Create"); Button deleteButton = new Button("Delete"); Button commitButton = new Button("Commit"); Button rollbackButton = new Button("Rollback"); refreshButton.Clicked += RefreshButtonClicked; createButton.Clicked += CreateButtonClicked; deleteButton.Clicked += DeleteButtonClicked; commitButton.Clicked += CommitButtonClicked; rollbackButton.Clicked += RollbackButtonClicked; HSeparator separator = new HSeparator(); view = new NodeView(Store); CellRendererText titleRenderer = new CellRendererText(); CellRendererText contentRenderer = new CellRendererText(); titleRenderer.Editable = true; contentRenderer.Editable = true; titleRenderer.Edited += NoteTitleEdited; contentRenderer.Edited += NoteContentEdited; view.AppendColumn("Title", titleRenderer, "text", 0); view.AppendColumn("Content", contentRenderer, "text", 1); ScrolledWindow scrolledWindow = new ScrolledWindow(); scrolledWindow.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); scrolledWindow.AddWithViewport(view); try { //Если сервер и клиент запускаются из ИДЕ (по порядку, но практически одновременно), //сервер не успевает создать сокет, поэтому надо немного подождать System.Threading.Thread.Sleep(1000); RemotingConfiguration.Configure("remoteNotes.exe.config", false); clientActivated = new NotesClientActivated(); singleton = new NotesSingleton(); singlecall = new NotesTransactionSinglecall(); } catch (System.Net.WebException) { Logger.Write("Unable to connect"); return; } foreach (Note note in singleton.GetPesistentData()) { store.AddNode(new NoteTreeNode(note)); } nodeViewHBox.PackStart(scrolledWindow, false, true, 0); nodeViewHBox.SetSizeRequest(200, 200); crudButtonsHBox.PackStart(refreshButton, false, true, 0); crudButtonsHBox.PackStart(createButton, false, true, 0); crudButtonsHBox.PackStart(deleteButton, false, true, 0); transactionContolButtonsHBox.PackStart(commitButton, false, true, 0); transactionContolButtonsHBox.PackStart(rollbackButton, false, true, 0); mainVBox.PackStart(nodeViewHBox, true, false, 0); mainVBox.PackStart(crudButtonsHBox, true, false, 0); mainVBox.PackStart(separator, true, false, 2); mainVBox.PackStart(transactionContolButtonsHBox, true, false, 0); Add(mainVBox); mainVBox.ShowAll(); Build(); }