コード例 #1
0
ファイル: SloggerApp.cs プロジェクト: RoDaniel/featurehouse
 public GtkSlogger()
 {
     Init();
        if(sMan == null)
     sMan = SlogManager.Connect();
        if(abMan == null)
     abMan = Novell.AddressBook.Manager.Connect();
        defaultPixbuf = new Pixbuf(Util.ImagesPath("sloghead.png"));
        Refresh();
 }
コード例 #2
0
 public FormsAddrBook()
 {
     InitializeComponent();
        manager = Manager.Connect();
        this.booksContacts.CurrentManager = manager;
        try
        {
     this.Icon = new Icon(Path.Combine(Application.StartupPath, @"res\address_app.ico"));
        }
        catch (Exception e)
        {
     logger.Debug(e, "Loading icon");
        }
        this.booksContacts.ContactSelected += new Novell.iFolder.FormsBookLib.BooksContacts.ContactSelectedDelegate(booksContacts_ContactSelected);
        this.booksContacts.BookSelected += new Novell.iFolder.FormsBookLib.BooksContacts.BookSelectedDelegate(booksContacts_BookSelected);
        this.detailsView.Paint += new PaintEventHandler(detailsView_Paint);
        toolBar1.Buttons[1].Enabled = false;
        toolBar1.Buttons[2].Enabled = false;
        toolBar1.Buttons[3].Enabled = false;
        toolBar1.Buttons[4].Enabled = false;
        this.menuFileNew.Popup += new EventHandler(menuFileNew_Popup);
 }
コード例 #3
0
 private void Init_Page()
 {
     ContactTreeStore = new ListStore(typeof(SharingListHolder));
        ContactTreeView.Model = ContactTreeStore;
        CellRendererPixbuf ccrp = new CellRendererPixbuf();
        TreeViewColumn ctvc = new TreeViewColumn();
        ctvc.PackStart(ccrp, false);
        ctvc.SetCellDataFunc(ccrp,
      new TreeCellDataFunc(ContactCellPixbufDataFunc));
        CellRendererText ccrt = new CellRendererText();
        ctvc.PackStart(ccrt, false);
        ctvc.SetCellDataFunc(ccrt,
      new TreeCellDataFunc(ContactCellTextDataFunc));
        ctvc.Title = "Contacts";
        ContactTreeView.AppendColumn(ctvc);
        ContactTreeView.AppendColumn("State",
      new CellRendererText(),
      new TreeCellDataFunc(StateCellTextDataFunc));
        ContactTreeView.AppendColumn("Access",
      new CellRendererText(),
      new TreeCellDataFunc(AccessCellTextDataFunc));
        ContactTreeView.Selection.Changed +=
      new EventHandler(on_selection_changed);
        ContactPixBuf = new Pixbuf(Util.ImagesPath("contact.png"));
        CurContactPixBuf = new Pixbuf(Util.ImagesPath("contact_me.png"));
        InvContactPixBuf = new Pixbuf(Util.ImagesPath("invited-contact.png"));
        guidList = new ArrayList();
        abMan = Novell.AddressBook.Manager.Connect( );
        if(abMan == null)
     Console.WriteLine("Warning: Unable to connect to AddressBook");
        ICSList memList = collection.GetMemberList();
        foreach(ShallowNode sNode in memList)
        {
     Member m = new Member(collection, sNode);
     SharingListHolder slh = new SharingListHolder(
      m, null);
     ContactTreeStore.AppendValues(slh);
     guidList.Add(m.UserID);
        }
        ICSList poList = pobox.Search(
      Subscription.SubscriptionCollectionIDProperty,
      collection.ID,
      SearchOp.Equal);
        foreach(ShallowNode sNode in poList)
        {
     Subscription sub = new Subscription(pobox, sNode);
     if (sub.SubscriptionState == SubscriptionStates.Ready)
     {
      if (pobox.StoreReference.GetCollectionByID(sub.SubscriptionCollectionID) != null)
      {
       continue;
      }
     }
     SharingListHolder slh = new SharingListHolder(
      null, sub);
     ContactTreeStore.AppendValues(slh);
        }
        if(collection.IsShareable(collection.GetCurrentMember()))
     addSharingButton.Sensitive = true;
        else
        {
     addSharingButton.Sensitive = false;
     FullControlRB.Sensitive = false;
     ReadWriteRB.Sensitive = false;
     ReadOnlyRB.Sensitive = false;
        }
        removeSharingButton.Sensitive = false;
        AcceptButton.Sensitive = false;
        DeclineButton.Sensitive = false;
 }