示例#1
0
 private void RefreshButtonClicked(object obj, EventArgs args)
 {
     singleton.PrintNotes();
     clientActivated.Clear();
     store.Clear();
     FillTable();
 }
示例#2
0
    protected void loadNotes()
    {
        store.Clear();
        notesStore = new FilesystemNotesStore(this.notesDirPath);

        ArrayList notes = notesStore.getAllNotes();

        for (int i = 0; i < notes.Count; i++)
        {
            Note noteEntry = notes[i] as Note;

            store.AddNode(new NoteNode(noteEntry));
        }
    }
示例#3
0
    protected virtual void OnBtnOrderClicked(object sender, System.EventArgs e)
    {
        // we just store all indices of drinks and send them as string
        StringBuilder sb = new StringBuilder("", 0, 0, 40);

        foreach (DrinkOrder d in OrderStore)
        {
            sb.Append(d.drinkIndex);
            sb.Append(",");
        }
        log(sb.ToString());
        messageToServer(Command.Buy, sb.ToString());
        orderStore.Clear();
        btnOrder.Label = "0 Euro";
    }
示例#4
0
        private void loadDisplay()
        {
            if (index != null)
            {
                if (pesStore != null)
                {
                    pesStore.Clear();
                }
                foreach (DataFile f in index.DataFiles)
                {
                    if (f.Status == FileStatus.InLibrary)
                    {
                        log.DebugFormat("Loading file {0}.", f.IconPath);
                        Gdk.Pixbuf icon = new Gdk.Pixbuf(f.IconPath);
                        int        w, h;
                        w = h = 255;
                        if (icon.Width < icon.Height)
                        {
                            w = (icon.Width * w) / icon.Height;
                        }
                        else
                        {
                            h = (icon.Height * h) / icon.Width;
                        }

                        icon = icon.ScaleSimple(w, h, InterpType.Bilinear);

                        log.DebugFormat("Loaded file {0}. Adding to node view.", f.FileName);
                        log.DebugFormat("Size of pixbuf {0}x{1}", icon.Width, icon.Height);
                        if (pesStore != null)
                        {
                            PesFile pf = new PesFile(icon, f.FileName + "\n" + "Test");
                            ResizeIcon += new ResizeIconDelegate(pf.ResizeIcon);
                            pesStore.AddNode(pf);
                        }
                    }
                }
                pesView.NodeStore = pesStore;
            }
        }