bool ContactsViewSourceFilter(object sender) { var person = (Person)sender; if (person.Profiles.Count == 0) { return(false); } if (Filter.ShowSoftContacts == false && person.IsSoft) { return(false); } if (!String.IsNullOrEmpty(Filter.SearchKeyword)) { return(person.Name.IndexOf(Filter.SearchKeyword, StringComparison.InvariantCultureIgnoreCase) > -1); } // Break out if source channel is not visible var channel = ChannelsManager.GetChannelObject(person.SourceChannelId); if (channel != null && !channel.IsVisible) { return(false); } return(true); }
void ChannelOnClick() { ChannelsManager channelsManager = GameObject.Find("ChannelsManager").GetComponent <ChannelsManager>(); channelsManager.LoadLightsMenu(channelId); channelsManager.HighlightAllChannelLights(channelId); }
void LoadChannelConfigs() { if (!configLoaded) { if (SourceChannelId > 0) { var channel = ChannelsManager.GetChannelObject(SourceChannelId); if (channel != null) { sourceChannelConfig = channel.Configuration; } } if (TargetChannelId > 0) { var channel = ChannelsManager.GetChannelObject(TargetChannelId); if (channel != null) { targetChannelConfig = channel.Configuration; } } configLoaded = true; } }
public Dictionary <long, Recipients> BuildRecipients() { var channels = new List <ChannelInstance>(); var result = new Dictionary <long, Recipients>(); // Append recients per channel if (message.MessageFolder == Folders.SentItems || message.MessageFolder == Folders.Drafts) { // Use target channels channels.Add(ChannelsManager.GetChannelObject(message.TargetChannel.ChannelId)); } else { // Use source channel channels.Add(ChannelsManager.GetChannelObject(message.SourceChannel.ChannelId)); } foreach (var channel in channels) { var recipients = new Recipients(); recipients.To.AddRange(FilterByTargetChannel(message.To, channel)); recipients.CC.AddRange(FilterByTargetChannel(message.CC, channel)); recipients.BCC.AddRange(FilterByTargetChannel(message.BCC, channel)); if (!recipients.IsEmpty) { result.Add(channel.Configuration.ChannelId, recipients); } } return(result); }
public void SetPluginHost(IPluginHost Host) { //We play this channel trough Asio output, so we choose the device NOSOUND Bass.BASS_Init(0, 48000, 0, IntPtr.Zero, null); this.manager = ChannelsManager.GetInstance(); BassUtils.LoadPlugins(); this.FHost = Host; this.FHost.CreateValueInput("Device", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInDevice); this.FPinInDevice.SetSubType(0, double.MaxValue, 1, 0, false, false, true); this.FHost.CreateValueInput("Channel Index", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinChannelIndex); this.FPinChannelIndex.SetSubType(0, double.MaxValue, 1, 0, false, false, true); this.FHost.CreateValueInput("Channels Count", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinChannelCount); this.FPinChannelCount.SetSubType(0, double.MaxValue, 1, 0, false, false, true); this.FHost.CreateValueInput("Enabled", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInEnabled); this.FPinInEnabled.SetSubType(0, 1, 1, 0, false, true, true); this.FHost.CreateValueOutput("Handle", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinOutHandle); this.FPinOutHandle.SetSubType(double.MinValue, double.MaxValue, 0, 0, false, false, true); this.FHost.CreateStringOutput("Status", TSliceMode.Single, TPinVisibility.True, out this.FPinOutStatus); }
/// <summary> /// Filters the conversations view source. /// </summary> /// <param name="sender">The sender.</param> /// <returns></returns> public bool CalendarViewSourceFilter(object sender) { // Cast to an event Event calendarevent = (Event)sender; // Check if the event is set to an object if (calendarevent == null) { return(false); } // Break out if channel is not visible var channel = ChannelsManager.GetChannelObject(calendarevent.SourceChannelId); if (channel != null && !channel.IsVisible) { return(false); } // Determine the folder type and check it with the saved filter option switch (calendarevent.EventFolder) { case Folders.Inbox: return(Filter.Received); case Folders.Trash: return(Filter.Deleted); default: Logger.Debug("Event {0} has non recognized folder {1}, hiding event", LogSource.UI, calendarevent, calendarevent.EventFolder); return(true); } }
public void SetPluginHost(IPluginHost Host) { this.FHost = Host; this.FManager = ChannelsManager.GetInstance(); BassUtils.LoadPlugins(); this.FHost.CreateValueInput("Handle", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInHandle); this.FPinInHandle.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true); this.FHost.CreateStringInput("Host", TSliceMode.Single, TPinVisibility.True, out this.FPinInServer); this.FPinInServer.SetSubType("localhost", false); this.FHost.CreateValueFastInput("Port", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInPort); this.FPinInPort.SetSubType(double.MinValue, 65000, 8000, 0, false, false, true); this.FHost.CreateStringInput("Password", TSliceMode.Single, TPinVisibility.True, out this.FPinInPwd); this.FPinInPwd.SetSubType("", false); this.FHost.CreateValueFastInput("Bit Rate", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInBitrate); this.FPinInBitrate.SetSubType(32, 320000, 1, 64, false, false, true); this.FHost.CreateStringOutput("Status", TSliceMode.Single, TPinVisibility.True, out this.FPinOutStatus); this.OnPluginHostSet(); this.FHost.CreateValueInput("Is Active", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInIsActive); this.FPinInIsActive.SetSubType(0, 1, 1, 0, false, true, true); }
protected override void ExecuteCore() { var config = ClientState.Current.DataService.SelectByKey <ChannelConfig>(configuration.ChannelId); if (notify && config.ChannelConnection == ChannelConnection.Connected) { // Remove configuration from server HttpServiceRequest.Post(CloudApi.ApiBaseUrl + "account/removechannel", String.Format("wrap_access_token={0}&key={1}", CloudApi.AccessToken, config.ChannelKey), true); } ClientState.Current.DataService.ExecuteNonQuery("DELETE FROM UserStatus WHERE SourceChannelId=" + config.ChannelConfigId); ClientState.Current.DataService.ExecuteNonQuery("DELETE FROM Profiles WHERE SourceChannelId=" + config.ChannelConfigId); ClientState.Current.DataService.ExecuteNonQuery("DELETE FROM Persons WHERE SourceChannelId=" + config.ChannelConfigId); ClientState.Current.DataService.ExecuteNonQuery("DELETE FROM Conversations WHERE ConversationIdentifier IN (SELECT ConversationIdentifier FROM Messages WHERE Messages.SourceChannelId=" + config.ChannelConfigId + " OR TargetChannelId=" + config.ChannelConfigId + ")"); ClientState.Current.DataService.ExecuteNonQuery("DELETE FROM Messages WHERE SourceChannelId=" + config.ChannelConfigId + " OR TargetChannelId=" + config.ChannelConfigId); ClientState.Current.DataService.ExecuteNonQuery("DELETE FROM Documents WHERE SourceChannelId=" + config.ChannelConfigId); ClientState.Current.DataService.ExecuteNonQuery("DELETE FROM DocumentVersions WHERE SourceChannelId=" + config.ChannelConfigId); ClientState.Current.DataService.Delete(config); mailbox.StatusUpdates.RemoveAll(u => u.SourceChannelId == config.ChannelConfigId || u.TargetChannelId == config.ChannelConfigId.ToString()); mailbox.Profiles.RemoveAll(p => p.SourceChannelId == config.ChannelConfigId); mailbox.Persons.RemoveAll(p => p.SourceChannelId == config.ChannelConfigId); // conversations are not deleted because well we don't care about then, will be gone on the next restart anyway mailbox.Messages.RemoveAll(m => m.SourceChannelId == config.ChannelConfigId || m.TargetChannelId == config.ChannelConfigId); mailbox.Documents.RemoveAll(d => d.SourceChannelId == config.ChannelConfigId || d.TargetChannelId == config.ChannelConfigId); mailbox.DocumentVersions.RemoveAll(d => d.SourceChannelId == config.ChannelConfigId || d.TargetChannelId == config.ChannelConfigId); // Delete channel from the ChannelsManager ChannelsManager.Remove(ChannelsManager.GetChannelObject(config.ChannelConfigId.Value)); EventBroker.Publish(AppEvents.RebuildToolbar); }
/// <summary> /// Constructor. /// </summary> /// <param name="dm"> a Descriptor Manager</param> /// <param name="channelMangr"> The channel manager of all interaction managed by this interaction manager</param> public InteractionManager(DescriptorManager dm, ChannelsManager channelMngr) { descriptorManager = dm; RegisterAssemblyHelpers(Assembly.GetExecutingAssembly()); // TODO ANGEL: Gualtrapa. Borrame!!!!!!!! //RegisterHelloWorldHelperClass(); if (descriptorManager != null) { //descriptorManager.AddDescriptors(Sxta.Rti1516ResourcesNames.BootstrapObjectModel); RegisterHelperClass(Sxta.Rti1516ResourcesNames.BootstrapObjectModel); } channelManager = channelMngr; channelManager.ChannelDataAvailable += new OnDataAvailable(this.OnDataAvailable); channelManager.NewChannelAvailable += new OnDataAvailable(this.OnChannelAvailable); serializer = new HlaEncodingSerializer(1, null, serializerManager); channel2TransportationMap.Add(TransportationType.HLA_RELIABLE, ChannelType.TCP); channel2TransportationMap.Add(TransportationType.HLA_BEST_EFFORT, ChannelType.UDP); channel2TransportationMap.Add(new TransportationType("multicast"), ChannelType.MULTICAST); channel2TransportationMap.Add(new TransportationType("memory"), ChannelType.MEMORY); }
public void When_GetAllChannels_Should_Return_AllChannelds() { var manager = new ChannelsManager(_channelServiceMock.Object, _deviceRepositoryMock.Object); var result = manager.GetAllChannels(); Assert.IsNotNull(result); Assert.IsTrue(result.Count() == 2); }
/// <summary> /// Loads and initializes the channels. /// </summary> public static void Channels() { var channels = ClientState.Current.DataService.SelectAll <ChannelConfig>(); foreach (var channel in channels) { ChannelsManager.Add(ChannelFactory.Create(channel)); } }
public void When_GetById_Should_Return_Channel() { var manager = new ChannelsManager(_channelServiceMock.Object, _deviceRepositoryMock.Object); var result = manager.GetById("1"); Assert.IsNotNull(result); Assert.IsTrue(result.Name == "channel1"); }
public void When_GetSubscribedChannels_Should_Return_AllChanneldsSubscribed() { var manager = new ChannelsManager(_channelServiceMock.Object, _deviceRepositoryMock.Object); var result = manager.GetSubscribedChannelsBySessionId("mysession"); Assert.IsNotNull(result); Assert.IsTrue(result.Count() == 3); }
void CreateProfileTabs() { ProfileTab.Items.Clear(); var profiles = new List <Profile>(); foreach (var profile in Person.Profiles) { var channel = profile.SourceChannel; if (channel != null && channel.Charasteristics.SupportsProfiles) { // get channel icon var assembly = channel.GetType().Assembly; var resourceNameFormat = assembly.GetName().Name + ".Resources.icon-13.png"; BitmapSource image; using (var stream = assembly.GetManifestResourceStream(resourceNameFormat)) image = new PngBitmapDecoder(stream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad).Frames[0]; // Create profile control for hard profiles var control = new ChannelProfileControl(Person, profile, channel); var tabItem = new TabItem { Content = control, Icon = image, AllowDelete = false, Style = (Style)FindResource("PersonsSocialTabItem"), Header = ColorConverter.ConvertFromString(ChannelsManager.GetChannelColor(channel)), }; ProfileTab.Items.Add(tabItem); } else { profiles.Add(profile); } } // If we have soft profiles for this person show them if (profiles.Count > 0) { var control = new SoftProfilesControl(Person); ProfileTab.Items.Add(new TabItem { Content = control, Header = ColorConverter.ConvertFromString("#757677"), Icon = _Fallback, AllowDelete = false, Style = (Style)FindResource("PersonsOtherTabItem") }); control.Profiles.AddRange(profiles); } }
/// <summary> /// Handles the Click event of the Help control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.Windows.RoutedEventArgs"/> instance containing the event data.</param> void Help_Click(object sender, RoutedEventArgs e) { ClientStats.LogEvent("Check credentials help (setup)"); var properties = ChannelsManager.GetChannelProperties(ChannelConfiguration.DisplayName); new Process { StartInfo = new ProcessStartInfo(properties.HelpUrl) }.Start(); }
public void LoadData(object data) { NewMessageDataHelper helper = (NewMessageDataHelper)data; // New message, select the default channel MessageEditControl.SelectedChannelId = ChannelsManager.GetDefaultChannel().Configuration.ChannelId; if (helper != null) { if (helper.SourceMessageId.HasValue) { using (VirtualMailBox.Current.Messages.ReaderLock) MessageEditControl.SourceMessage = VirtualMailBox.Current.Messages .First(m => m.MessageId == helper.SourceMessageId); } if (helper.To != null) { MessageEditControl.AddToRecipients(helper.To); } if (helper.Cc != null) { MessageEditControl.AddCCRecipients(helper.Cc); } if (helper.Bcc != null) { MessageEditControl.AddBCCRecipients(helper.Bcc); } if (helper.AttachedFiles != null) { foreach (var attachedFile in helper.AttachedFiles) { var info = new FileInfo(attachedFile.Streamname); if (!info.Exists) { ClientState.Current.ShowMessage( new AppMessage(String.Format(Strings.FileNotFound, info.Name)), MessageType.Error); continue; } MessageEditControl.AttachedFiles.Add(attachedFile); } } MessageEditControl.SetContext(helper.Context); MessageEditControl.MessageText = helper.Body; if (helper.SelectedChannelId > 0) { MessageEditControl.SelectedChannelId = helper.SelectedChannelId; } } }
public void SetPluginHost(IPluginHost Host) { this.FHost = Host; this.manager = ChannelsManager.GetInstance(); //Config Pins this.FHost.CreateValueInput("Is Decoding", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out this.FPinCfgIsDecoding); this.FPinCfgIsDecoding.SetSubType(0, 1, 1, 0, false, true, true); //Input Pins this.FHost.CreateValueInput("Play", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInPlay); this.FPinInPlay.SetSubType(0, 1, 1, 0, false, true, true); this.FHost.CreateValueInput("Buffer Start Position", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInLoopStartPos); this.FPinInLoopStartPos.SetSubType(0, double.MaxValue, 1, 0, false, false, true); this.FHost.CreateValueInput("Buffer End Position", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInLoopEndPos); this.FPinInLoopEndPos.SetSubType(0, double.MaxValue, 1, 0, false, false, true); this.FHost.CreateValueInput("Pitch", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInPitch); this.FPinInPitch.SetSubType(-60, 60, 1, 0, false, false, false); this.FHost.CreateValueInput("Tempo", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInTempo); this.FPinInTempo.SetSubType(-95, 5000, 1, 0, false, false, false); this.FHost.CreateValueFastInput("Buffer", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInBuffer); this.FPinInBuffer.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); this.FHost.CreateValueInput("Write Buffer", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInReset); this.FPinInReset.SetSubType(0, 1, 1, 0, true, false, true); this.FHost.CreateValueFastInput("Data", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInData); this.FPinInData.SetSubType(double.MinValue, double.MaxValue, 0.01, 0, false, false, false); this.FHost.CreateValueFastInput("Index", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInIndices); this.FPinInIndices.SetSubType(0, double.MaxValue, 1, 0, false, false, true); this.FHost.CreateValueInput("Write Data", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInDoWrite); this.FPinInDoWrite.SetSubType(0, 1, 1, 0, true, false, true); this.FHost.CreateValueInput("Restore", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInRestore); this.FPinInRestore.SetSubType(0, 1, 1, 0, true, false, true); //Output this.FHost.CreateValueOutput("Handle Out", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutHandle); this.FPinOutHandle.SetSubType(double.MinValue, double.MaxValue, 0, 0, false, false, true); this.FHost.CreateValueOutput("Current Position", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutCurrentPosition); this.FPinOutCurrentPosition.SetSubType(0, double.MaxValue, 0, 0.0, false, false, false); this.FHost.CreateValueOutput("Buffer Position", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutBufferPosition); this.FPinOutBufferPosition.SetSubType(0, double.MaxValue, 0, 0.0, false, false, true); }
protected override void ExecuteCore() { // Get the keywords we need to perform a search for foreach (var kw in VirtualMailBox.Current.StreamSearchKeywords.GetKeyWords()) { #region Parse channelname and keyword var parts = kw.Split('|'); if (parts.Length != 2) { Logger.Warn("Invalid search keyword. Keyword = {0}", LogSource.Sync, kw); return; } var channelname = parts[0]; var keyword = parts[1]; // Find channel with given name var channels = ChannelsManager.GetStatusChannels(); var channel = channels.FirstOrDefault(c => c.Configuration.DisplayName == channelname); if (channel == null) { Logger.Warn("Could not find channel for search keyword. ChannelName = {0}, Keyword = {1}", LogSource.Sync, channelname, keyword); return; } #endregion // Perform keyword search try { var parser = new UserStatusParser(channel.Configuration, kw); var updates = channel.StatusUpdatesChannel.GetUpdates(keyword, 50); foreach (var statusupdate in updates) { Logger.Debug("Received search update. ChannelStatusKey = {0}, DatePosted = {1}", LogSource.Sync, statusupdate.ChannelStatusKey, statusupdate.DatePosted); parser.ProcessStatusUpdate(statusupdate, StatusTypes.SearchUpdate); } } catch (Exception ex) { Logger.Error("An error has occured while getting search result from {0}. Keyword = {1} Exception = {2}", LogSource.Sync, channelname, keyword, ex); } } // Save last run time ChannelContext.Current.ClientContext.SaveSetting("LastSyncSearchStreamDate", DateTime.Now); EventBroker.Publish(AppEvents.SyncStatusUpdatesFinished); }
public void SetPluginHost(IPluginHost Host) { this.FHost = Host; this.FManager = ChannelsManager.GetInstance(); //Input Pins this.FHost.CreateValueInput("Handle In", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInHandle); this.FPinInHandle.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true); this.FHost.CreateValueOutput("RMS", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutRMS); this.FHost.CreateValueOutput("Average", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutAverage); }
void UserControl_Loaded(object sender, RoutedEventArgs e) { DisplayNameTextBox.Text = SettingsManager.ClientSettings.AppConfiguration.Fullname; SignatureTextBox.Text = SettingsManager.ClientSettings.AppConfiguration.Signature; IsStatsDisabledCheckBox.IsChecked = SettingsManager.ClientSettings.AppConfiguration.IsStatsDisabled; IsDefaultEmailClientCheckBox.IsChecked = SettingsManager.ClientSettings.AppConfiguration.IsDefaultMailClientCheckEnabled; if (HasMailChannelConfigured) { DefaultEmailAddressComboBox.SelectedItem = ChannelsManager.GetDefaultChannel().Configuration; } }
/// <summary> /// Remove all publish channels. It is useful for removing uncleared published channels that could not be removed due to export faliure. /// </summary> public void RemoveAllPublishChannels() { List <Channel> channels = ChannelsManager.GetChannelsByName(PUBLISH_AUDIO_CHANNEL_NAME); if (channels != null && channels.Count > 0) { for (int i = channels.Count - 1; i >= 0; i--) { ChannelsManager.RemoveManagedObject(channels[i]); } } }
public void SetPluginHost(IPluginHost Host) { this.FHost = Host; this.manager = ChannelsManager.GetInstance(); //Config Pins this.FHost.CreateValueInput("Is Decoding", 1, null, TSliceMode.Single, TPinVisibility.OnlyInspector, out this.FPinCfgIsDecoding); this.FPinCfgIsDecoding.SetSubType(0, 1, 1, 0, false, true, true); //Input Pins this.FHost.CreateValueInput("Play", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInPlay); this.FPinInPlay.SetSubType(0, 1, 1, 0, false, true, true); this.FHost.CreateValueInput("Loop", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPInInLoop); this.FPInInLoop.SetSubType(0, 1, 1, 0, false, true, true); this.FHost.CreateValueInput("Loop Start Time", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInStartTime); this.FPinInStartTime.SetSubType(0, double.MaxValue, 0.01, 0, false, false, false); this.FHost.CreateValueInput("Loop End Time", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInEndTime); this.FPinInEndTime.SetSubType(0, double.MaxValue, 0.01, 0, false, false, false); this.FHost.CreateValueInput("Do Seek", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInDoSeek); this.FPinInDoSeek.SetSubType(0, 1, 1, 0, true, false, true); this.FHost.CreateValueInput("Seek Time", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInPosition); this.FPinInPosition.SetSubType(0, double.MaxValue, 0, 0.0, false, false, false); this.FHost.CreateValueInput("Mono", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInMono); this.FPinInMono.SetSubType(0, 1, 1, 0, false, true, true); this.FHost.CreateValueInput("Pitch", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInPitch); this.FPinInPitch.SetSubType(-60, 60, 1, 0, false, false, false); this.FHost.CreateValueInput("Tempo", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInTempo); this.FPinInTempo.SetSubType(-95, 5000, 1, 0, false, false, false); this.FHost.CreateStringInput("File Name", TSliceMode.Single, TPinVisibility.True, out this.FPinInFilename); this.FPinInFilename.SetSubType("", true); //Output Pins this.FHost.CreateValueOutput("Handle Out", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutHandle); this.FPinOutHandle.SetSubType(double.MinValue, double.MaxValue, 0, 0, false, false, true); this.FHost.CreateValueOutput("Current Position", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutCurrentPosition); this.FPinOutCurrentPosition.SetSubType(0, double.MaxValue, 0, 0.0, false, false, false); this.FHost.CreateValueOutput("Length", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutLength); this.FPinOutLength.SetSubType(0, double.MaxValue, 0, 0.0, false, false, false); this.FHost.CreateValueOutput("File End", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinOutEnd); this.FPinOutEnd.SetSubType(0, 1, 1, 0, true, false, true); }
/// <summary> /// Create a section node belonging to this presentation. /// </summary> public SectionNode CreateSectionNode() { SectionNode node = (SectionNode)m_ObiNodeFactory.createNode(XukAble.GetXukName(typeof(SectionNode)).z(PrettyFormat), DataModelFactory.NS); //sdk2 :local ObiNode factory used urakawa.property.channel.ChannelsProperty channelsProperty = PropertyFactory.CreateChannelsProperty(); node.AddProperty(channelsProperty); // Create the text media object for the label with a default label TextMedia labelMedia = MediaFactory.CreateTextMedia(); labelMedia.Text = Localizer.Message("default_section_label"); channelsProperty.SetMedia(ChannelsManager.GetOrCreateTextChannel(), labelMedia); return(node); }
public void SetPluginHost(IPluginHost Host) { this.FHost = Host; this.manager = ChannelsManager.GetInstance(); BassUtils.LoadPlugins(); this.FHost.CreateValueInput("Device", 1, null, TSliceMode.Single, TPinVisibility.True, out this.FPinInDevice); this.FPinInDevice.SetSubType(-1, double.MaxValue, 1, -1, false, false, true); this.FHost.CreateValueInput("Handles In", 1, null, TSliceMode.Dynamic, TPinVisibility.True, out this.FPinInHandle); this.FPinInHandle.SetSubType(double.MinValue, double.MaxValue, 1, 0, false, false, true); }
public GeneralMessagesService(WebSocketConnectionManager manager, AccountsManagerWeb am, ChannelsManager cm, MessagesManagerWeb mmw) : base(manager) { _mmw = mmw; _am = am; _cm = cm; foreach (var c in cm.GetAllChannels()) { Channels.TryAdd(c.Id, new SocketChannel(c, _am)); } foreach (var r in cm.GetAllRooms()) { Rooms.TryAdd(r.Id, new SocketRoom(r, this, _am)); } }
public void Init() { app = new MainApplication(new string[2] { @"-config=Resources\TestConfig1.xml", @"-dialog=false" }); // Log Debug level message if (log.IsDebugEnabled) { log.Debug("Test " + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType + " Start"); } channelMngr = new ChannelsManager(); }
/// <summary> /// Animates the closed logo. /// </summary> private void AnimateClosedLogo() { Canvas.SetTop(Inbox2SetupClosedLogoCanvas, Canvas.GetTop(Inbox2SetupOpenedLogoCanvas)); PennerDoubleAnimation.Equations equation = PennerDoubleAnimation.Equations.QuintEaseOut; int durationMS = 1000; // Hide Opened Logo Animator.AnimatePenner(Inbox2SetupOpenedLogoCanvas, OpacityProperty, equation, Inbox2SetupOpenedLogoCanvas.Opacity, 0, durationMS, delegate { Inbox2SetupOpenedLogoCanvas.Visibility = Visibility.Hidden; }); // Show Closed Logo Animator.AnimatePenner(Inbox2SetupClosedLogoCanvas, OpacityProperty, equation, 0, 1, durationMS, delegate { Animator.AnimatePenner(Inbox2SetupClosedImage, WidthProperty, equation, Inbox2SetupClosedImage.Width, Inbox2SetupClosedImage.Width / 2, durationMS, delegate { }); Animator.AnimatePenner(Inbox2SetupClosedImage, HeightProperty, equation, Inbox2SetupClosedImage.Height, Inbox2SetupClosedImage.Height / 2, durationMS, delegate { Animator.AnimatePenner(ChannelConfigurationAddStackPanel, OpacityProperty, equation, null, 0, durationMS, delegate { ChannelConfigurationAddStackPanel.Visibility = Visibility.Hidden; }); Animator.AnimatePenner(Inbox2SetupClosedLogoCanvas, Canvas.LeftProperty, equation, null, 0, durationMS, delegate { ChannelSetupFinishStackPanel.Visibility = System.Windows.Visibility.Visible; }); }); }); OnPropertyChanged("ChannelConfiguration"); // Setup form to complete setup. ChannelsManager.Channels[0].Configuration.IsDefault = true; DefaultEmailAddressComboBox.SelectedIndex = 0; if (ChannelsManager.Channels.Count <= 1 || ChannelsManager.Channels.Select(s => s.Configuration).Where(c => c.Charasteristics.SupportsEmail).Count() == 0) { DefaultEmailAddressTextBlock.Visibility = Visibility.Collapsed; DefaultEmailAddressComboBox.Visibility = Visibility.Collapsed; } var address = ChannelsManager.GetDefaultSourceAddress(); if (address.ToString().Contains("@")) { string[] parts = address.ToString().Split('@'); DisplayNameTextBox.Text = char.ToUpper(parts[0][0]) + parts[0].Substring(1); } else { DisplayNameTextBox.Text = address.DisplayName; } DisplayNameTextBox.Focus(); }
public static void ReplyAll(Message source, string text) { var recipients = new SourceAddressCollection(); recipients.AddRange(source.To); recipients.AddRange(source.CC); long channelid; // Remove receivers own address from list if (source.SourceChannelId != 0) { var channel = ChannelsManager.GetChannelObject(source.SourceChannelId); var sourceAddress = channel.InputChannel.GetSourceAddress(); if (recipients.Contains(sourceAddress)) { recipients.Remove(sourceAddress); } channelid = source.SourceChannelId; } else { var channel = ChannelsManager.GetChannelObject(source.TargetChannelId); var sourceAddress = channel.InputChannel.GetSourceAddress(); if (recipients.Contains(sourceAddress)) { recipients.Remove(sourceAddress); } channelid = source.TargetChannelId; } ClientState.Current.ViewController.MoveTo( PluginsManager.Current.GetPlugin <ConversationsPlugin>().NewItemView, new NewMessageDataHelper { SourceMessageId = source.MessageId, SelectedChannelId = channelid, Context = "Re: " + source.Context, To = source.From.ToList(), Cc = recipients, Body = MessageBodyGenerator.CreateBodyTextForReply(source, text), SuppressSignature = !String.IsNullOrEmpty(text) }); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) { return(null); } if (value != null) { var channel = ChannelsManager.GetChannelObject((long)value); return(channel.Configuration.DisplayName); } return(String.Empty); }
void BuildTabs() { OnPropertyChanged("HasStatusChannels"); OnPropertyChanged("HasDockedChannels"); StreamsTab.Items.Clear(); var allItemsTabItem = new OverviewColumnTabItem(null, String.Empty) { Style = (Style)FindResource("StatusUpdatesColumnAllItemsTabItem"), Icon = new BitmapImage(new Uri("pack://application:,,,/Inbox2.UI.Resources;component/icons/icon-inbox2.png")) }; StreamsTab.Items.Add(allItemsTabItem); foreach (var channel in ChannelsManager.GetStatusChannels()) { if (channel.IsVisible) { var tabItem = new OverviewColumnTabItem(channel, String.Empty) { Style = (Style)FindResource("StatusUpdatesColumnTabItem"), Icon = (BitmapSource) new ChannelIconConverter() .Convert(channel.Configuration, typeof(BitmapSource), 13, Thread.CurrentThread.CurrentCulture) }; StreamsTab.Items.Add(tabItem); } } if (SearchKeywordsHelper.HasSearchChannel()) { var channel = SearchKeywordsHelper.GetSearchChannel(); foreach (var keyword in VirtualMailBox.Current.StreamSearchKeywords.GetKeyWords()) { var tabItem = new OverviewColumnTabItem(channel, keyword.Split('|')[1]) { Style = (Style)FindResource("StatusUpdatesColumnTabItem"), Icon = (BitmapSource) new ChannelIconConverter() .Convert(channel.Configuration, typeof(BitmapSource), 13, Thread.CurrentThread.CurrentCulture) }; StreamsTab.Items.Add(tabItem); } } }