Exemple #1
0
        private void DoSearch(IAppHelper helper)
        {
            statusLabel.Text = "Performing Search. Please Wait...";
            this.Cursor      = Cursors.WaitCursor;
            // use an app helper to locate information
            //helper = appHelperFactory.GetAppHelper(appHelper);
            AppHelperContext context = new SimpleAppHelperContext();

            context["title"] = txtMovieName.Text;
            AppHelperItem[] items = helper.LocateItems(context);

            statusLabel.Text = null;
            this.Cursor      = Cursors.Default;

            switch (items.Length)
            {
            case 0:
                MessageBox.Show("No Match Found for: " + txtMovieName.Text);
                break;

            case 1:
                AppHelperItemSelected(helper, items[0]);
                break;

            default:
                AppHelperResultSelector resultSelector = new AppHelperResultSelector(helper);
                resultSelector.ItemSelectedEvent += new AppHelperItemSelected(AppHelperItemSelected);
                resultSelector.Items              = items;
                resultSelector.Show();
                break;
            }
        }
 private void btnSearch_Click(object sender, EventArgs e)
 {
     string appHelperName = (string)drpHelperNames.SelectedItem;
     string contextFieldName = null;
     foreach (Control c in tblInputContext.Controls)
     {
         if (c is Label)
         {
             contextFieldName = c.Text;
         }
         else if (c is TextBox)
         {
             if (contextFieldName != null && c.Text.Length > 0)
                 context[contextFieldName] = c.Text;
             else if (contextFieldName != null)
                 context[contextFieldName] = null;
         }
     }
     helper = factory.GetAppHelper(appHelperName);
     drpResults.Controls.Clear();
     AppHelperItem []items = helper.LocateItems(context);
     foreach (AppHelperItem item in items)
     {
         drpResults.Items.Add(new ItemHolder(item));
     }
 }
Exemple #3
0
        public KListViewItem(KfsStatusPath obj, IAppHelper _helper)
        {
            /* Create all subitems, without any text in them */
            CustomListViewSubItem subItem;
            m_helper = _helper;

            subItem = new CustomListViewSubItem();
            subItem.Name = SizeKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = TransferStatusKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = ModifiedDateKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = ModifiedByKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = StatusKey;
            AddCustomSubItem(subItem);

            subItem = new CustomListViewSubItem();
            subItem.Name = CommitIDKey;
            AddCustomSubItem(subItem);

            UpdateInfos(obj);
        }
Exemple #4
0
 public MaterialsAPIController(IMaterialsRepository materialsRepository, IAppHelper appHelper, ILogger <MaterialsAPIController> logger, IMapper iMapper)
 {
     _materialsRepository = materialsRepository;
     _appHelper           = appHelper;
     _logger  = logger;
     _iMapper = iMapper;
 }
Exemple #5
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            string appHelperName    = (string)drpHelperNames.SelectedItem;
            string contextFieldName = null;

            foreach (Control c in tblInputContext.Controls)
            {
                if (c is Label)
                {
                    contextFieldName = c.Text;
                }
                else if (c is TextBox)
                {
                    if (contextFieldName != null && c.Text.Length > 0)
                    {
                        context[contextFieldName] = c.Text;
                    }
                    else if (contextFieldName != null)
                    {
                        context[contextFieldName] = null;
                    }
                }
            }
            helper = factory.GetAppHelper(appHelperName);
            drpResults.Controls.Clear();
            AppHelperItem [] items = helper.LocateItems(context);
            foreach (AppHelperItem item in items)
            {
                drpResults.Items.Add(new ItemHolder(item));
            }
        }
Exemple #6
0
 /// <summary>
 /// Initialization code common to both the deserialized and
 /// non-deserialized cases. This method must be called explicitly
 /// when the workspace is deserialized.
 /// </summary>
 public virtual void Initialize(IAppHelper appHelper)
 {
     Helper = appHelper;
     Helper.OnKwsStatusChanged += OnKwsStatusChangedInternal;
     AppStatus = KwsAppStatus.Stopped;
     DirtyFlag = false;
 }
        public AppKfsCreateItem(IAppHelper _helper, List<KfsServerOp> _operations)
            : base(_helper, _operations)
        {
            Debug.Assert(m_ops.Count > 0);

            FirstOp = m_ops[0] as KfsCreateServerOp;

            Debug.Assert(FirstOp != null);
        }
Exemple #8
0
        private void AppHelperItemSelected(IAppHelper helper, AppHelperItem item)
        {
            System.Diagnostics.Debug.WriteLine(string.Format("got selected item. name: {0}. value: {1}", item.Name, item.Value));
            AppHelperContext context = new SimpleAppHelperContext();

            if (helper.LoadItem(item, context))
            {
                // if (context["title"] != null)
                //     this.txtMovieName.Text = (string)context["title"];
                MediaItem.ReadFrom(context);
                UpdateDisplay();
            }
        }
 public MenuFactory(IStartupHelper startupHelper
                    , IWindowsManager windowsManager, IAppHelper appHelper,
                    ISettingsManager <ApplicationSettings> settingsManager, ISupportMailContentGenerator supportMailContentGenerator,
                    IServiceProxy serviceProxy, IActiveDevice activeDevice, IMetaPubSub metaMessenger)
 {
     _startupHelper               = startupHelper;
     _windowsManager              = windowsManager;
     _appHelper                   = appHelper;
     _settingsManager             = settingsManager;
     _supportMailContentGenerator = supportMailContentGenerator;
     _serviceProxy                = serviceProxy;
     _activeDevice                = activeDevice;
     _metaMessenger               = metaMessenger;
 }
Exemple #10
0
        public NotificationItem(AnpMsg _msg, UInt32 appID, IAppHelper _helper)
        {
            m_helper             = _helper;
            m_appID              = appID;
            m_notificationToTake = DefaultEffect;

            // Show a popup only if the event occured after we logged on the
            // workspace and we caught up with the KAS events. In some cases we
            // do not add an Anp message to this object, simply check for the
            // CaughtUp flag.
            WantShowPopup = (_msg == null || _msg.ID > _helper.KwsLoginLatestEventId) &&
                            _helper.HasCaughtUpWithKasEvents();

            if (_msg != null)
            {
                Init(_msg);
            }
        }
Exemple #11
0
        public KTreeNode(KfsStatusPath obj, ImageListManager mgr, IAppHelper _helper)
            : base()
        {
            Debug.Assert(obj.IsDir());
            m_helper = _helper;

            m_childs = new SortedDictionary<string, KListViewItem>();
            m_onServer = obj.OnServer();

            m_lvImageListMgr = mgr;

            this.Text = obj.IsRoot() ? "Share" : obj.Name;
            this.ImageKey = "FolderClosed";
            this.SelectedImageKey = "FolderOpened";
            m_status = obj.Status;
            m_name = obj.Name;

            CreateChilds(obj);
        }
Exemple #12
0
        public MessageWindow(IAppHelper appHelper)
        {
            _appHelper = appHelper;

            InitializeComponent();
            Top           = SystemParameters.VirtualScreenTop + 1000;
            ShowInTaskbar = false;
            ShowActivated = false;
            Show();
            Hide();

            var        handler = new WindowInteropHelper(this).EnsureHandle();
            HwndSource source  = HwndSource.FromHwnd(handler);

            source.AddHook(WndProc);

            // Required for proper interaction with chromium-based browsers
            AutomationRegistrator.Instance.RegisterHook();
        }
        public MainViewModel(IDeviceManager deviceManager,
                             IMenuFactory menuFactory,
                             IActiveDevice activeDevice,
                             IMetaPubSub metaMessenger,
                             ViewModelLocator viewModelLocator,
                             IAppHelper appHelper,
                             SoftwareUnlockSettingViewModel softwareUnlock)
        {
            _deviceManager    = deviceManager;
            _menuFactory      = menuFactory;
            _activeDevice     = activeDevice;
            _viewModelLocator = viewModelLocator;
            _appHelper        = appHelper;
            _softwareUnlock   = softwareUnlock;

            InitMenu();

            _deviceManager.DevicesCollectionChanged += Devices_CollectionChanged;
            _activeDevice.ActiveDeviceChanged       += ActiveDevice_ActiveDeviceChanged;

            metaMessenger.Subscribe <OpenPasswordManagerMessage>((p) => { MenuPasswordManager.IsChecked = true; return(Task.CompletedTask); });
            metaMessenger.Subscribe <OpenHideezKeyPageMessage>((p) => { MenuHardwareKeyPage.IsChecked = true; return(Task.CompletedTask); });
            metaMessenger.Subscribe <OpenMobileAuthenticatorPageMessage>((p) => { MenuSoftwareKeyPage.IsChecked = true; return(Task.CompletedTask); });
        }
        public InfoButton()
        {
            InitializeComponent();

            _appHelper = App.Container.Resolve<IAppHelper>();
        }
 public AttachManagementNotificationItem(IAppHelper helper, AnpMsg skurlCmd)
     : base(null, 0, helper)
 {
     m_emailSubject = skurlCmd.Elements[0].String;
     m_notificationToTake = NotificationEffect.ShowPopup;
 }
Exemple #16
0
 public override void Initialize(IAppHelper appHelper)
 {
     base.Initialize(appHelper);
     Settings = new AppChatboxControl.AppChatBoxSettings();
     Helper.OnKwsUserChanged += OnUserChanged;
     m_lastEventPopup = DateTime.MinValue;
 }
Exemple #17
0
 private void AppHelperItemSelected(IAppHelper helper, AppHelperItem item)
 {
     System.Diagnostics.Debug.WriteLine(string.Format("got selected item. name: {0}. value: {1}", item.Name, item.Value));
     AppHelperContext context = new SimpleAppHelperContext();
     if (helper.LoadItem(item, context))
     {
        // if (context["title"] != null)
        //     this.txtMovieName.Text = (string)context["title"];
         MediaItem.ReadFrom(context);
         UpdateDisplay();
     }
 }
Exemple #18
0
 /// <summary>
 /// Non-deserializating constructor.
 /// </summary>
 public KwsApp(IAppHelper appHelper)
 {
     Initialize(appHelper);
 }
Exemple #19
0
 /// <summary>
 /// Non-deserializating constructor.
 /// </summary>
 public KwsApp(IAppHelper appHelper)
 {
     Initialize(appHelper);
 }
Exemple #20
0
 public AppScreenSharing(IAppHelper _helper)
     : base(_helper)
 {
     m_lstSharingSessions = new AppSharingSessionList();
 }
Exemple #21
0
 public AppKfs(IAppHelper _helper)
     : base(_helper)
 {
 }
Exemple #22
0
 public AppPublicBridge(IAppHelper _helper)
     : base(_helper)
 {
 }
Exemple #23
0
 public override void Initialize(IAppHelper appHelper)
 {
     base.Initialize(appHelper);
     if (m_share != null) m_share.Initialize();
 }
 public ChatNotificationItem(AnpMsg _msg, IAppHelper _helper, bool _forceHidePopup)
     : base(_msg, KAnpType.KANP_NS_CHAT, _helper)
 {
     m_msg = _msg;
     m_forcedHidePopup = _forceHidePopup;
 }
Exemple #25
0
 public AuthController(UserManager <ApplicationUsers> userManager, IAppHelper appHelper, SignInManager <ApplicationUsers> signInManager)
 {
     _userManager   = userManager;
     _appHelper     = appHelper;
     _signInManager = signInManager;
 }
Exemple #26
0
 public KwmTunnelThread(IAppHelper helper, String host, int port)
 {
     Helper = helper;
     Host = host;
     Port = port;
 }
 public AppKfsNotificationItem(IAppHelper _helper, List<KfsServerOp> _operations)
     : base(null, KAnpType.KANP_NS_KFS, _helper)
 {
     m_ops = _operations;
 }
 public AppHelperResultSelector(IAppHelper appHelper)
 {
     InitializeComponent();
     this.appHelper = appHelper;
 }
        public AppKfsPhase2Item(IAppHelper _helper, List<KfsServerOp> _operations, SortedDictionary<UInt64, List<KfsServerOp>> seenPhase1Ops)
            : base(_helper, _operations)
        {
            Debug.Assert(m_ops.Count > 0);

            FirstOp = m_ops[0] as KfsPhase2ServerOp;
            Debug.Assert(seenPhase1Ops.ContainsKey(FirstOp.CommitID));
            // FIXME seenPhase1Ops might be empty if the KWM is closed between the phase1 and the phase2 event.
            m_seenPhase1Ops = seenPhase1Ops[FirstOp.CommitID];
            seenPhase1Ops.Remove(FirstOp.CommitID);

            Debug.Assert(FirstOp != null);
        }
Exemple #30
0
 public ScreenSharingNotificationItem(AnpMsg _msg, IAppHelper _helper)
     : base(_msg, KAnpType.KANP_NS_VNC, _helper)
 {
     if (m_eventType == KAnpType.KANP_EVT_VNC_START)
         m_sessionSubject = _msg.Elements[4].String;
 }
        public KfsFileDownloadedNotificationItem(AnpMsg _msg, IAppHelper _helper, KfsServerFile f)
            : base(_msg, KAnpType.KANP_NS_KFS, _helper)
        {
            m_downloaderUID = _msg.Elements[2].UInt32;
            m_uploaderUID = f.CurrentVersion.UserID;
            m_fileName = f.Name;
            m_fileRelativePath = f.RelativePath;

            m_notificationToTake = NotificationEffect.ShowPopup;
        }
Exemple #32
0
        public NotificationItem(AnpMsg _msg, UInt32 appID, IAppHelper _helper)
        {
            m_helper = _helper;
            m_appID = appID;
            m_notificationToTake = DefaultEffect;

            // Show a popup only if the event occured after we logged on the
            // workspace and we caught up with the KAS events. In some cases we
            // do not add an Anp message to this object, simply check for the
            // CaughtUp flag.
            WantShowPopup = (_msg == null || _msg.ID > _helper.KwsLoginLatestEventId) &&
                            _helper.HasCaughtUpWithKasEvents();

            if (_msg != null) Init(_msg);
        }
        public KfsNotification(IAppHelper _helper, List<KfsServerOp> _operations, SortedDictionary<UInt64, List<KfsServerOp>> seenPhase1Ops)
        {
            m_incomingServerOps = _operations;

            SeparateServerOpByType(seenPhase1Ops);

            if (m_createOps.Count > 0)
                Items.Add(new AppKfsCreateItem(_helper, m_createOps));

            if (m_deleteOps.Count > 0)
                Items.Add(new AppKfsDeleteItem(_helper, m_deleteOps));

            if (m_moveOps.Count > 0)
                Items.Add(new AppKfsMoveItem(_helper, m_moveOps));

            if (m_updateOps.Count > 0)
                Items.Add(new AppKfsUpdateItem(_helper, m_updateOps));

            if (m_phase2Ops.Count > 0)
                Items.Add(new AppKfsPhase2Item(_helper, m_phase2Ops, seenPhase1Ops));
        }
Exemple #34
0
        private void DoSearch(IAppHelper helper)
        {
            statusLabel.Text = "Performing Search. Please Wait...";
            this.Cursor = Cursors.WaitCursor;
            // use an app helper to locate information
            //helper = appHelperFactory.GetAppHelper(appHelper);
            AppHelperContext context = new SimpleAppHelperContext();
            context["title"] = txtMovieName.Text;
            AppHelperItem[] items = helper.LocateItems(context);

            statusLabel.Text = null;
            this.Cursor = Cursors.Default;

            switch (items.Length)
            {
                case 0:
                    MessageBox.Show("No Match Found for: " + txtMovieName.Text);
                    break;
                case 1:
                    AppHelperItemSelected(helper, items[0]);
                    break;
                default:
                    AppHelperResultSelector resultSelector = new AppHelperResultSelector(helper);
                    resultSelector.ItemSelectedEvent += new AppHelperItemSelected(AppHelperItemSelected);
                    resultSelector.Items = items;
                    resultSelector.Show();
                    break;
            }
        }
Exemple #35
0
 public AppChatBox(IAppHelper appHelper)
     : base(appHelper)
 {
     m_chatWindowsContent[0] = "";
 }
Exemple #36
0
 public PublicChatGer(AppPublicBridge app, UInt64 reqID, UInt32 userID,
     UInt32 timeout, String userName, String subject)
 {
     m_app = app;
     m_helper = app.Helper;
     m_reqID = reqID;
     m_userID = userID;
     m_timeout = timeout;
     m_userName = userName;
     m_subject = subject;
 }
Exemple #37
0
 public NotificationItem(AnpMsg _msg, UInt32 appID, IAppHelper _helper)
 {
     m_helper = _helper;
     m_appID = appID;
     m_notificationToTake = DefaultEffect;
     if (_msg != null) Init(_msg);
 }
Exemple #38
0
 /// <summary>
 /// Initialization code common to both the deserialized and
 /// non-deserialized cases. This method must be called explicitly
 /// when the workspace is deserialized.
 /// </summary>
 public virtual void Initialize(IAppHelper appHelper)
 {
     Helper = appHelper;
     Helper.OnKwsStatusChanged += OnKwsStatusChangedInternal;
     AppStatus = KwsAppStatus.Stopped;
     DirtyFlag = false;
 }
Exemple #39
0
 public KwmTunnelThread(IAppHelper helper, String host, int port)
 {
     Helper = helper;
     Host   = host;
     Port   = port;
 }