public FrameworkElement method_0(string string_4, PluginOptionText pluginOptionText_0) { StackPanel stackPanel = new StackPanel(); TextBox textBox = new TextBox(); textBox.Text = pluginOptionText_0.Value; textBox.Name = string_4; this._pluginConfigPanel.Add(string_4, (FrameworkElement)textBox); stackPanel.Children.Add((UIElement) new TextBlock() { Text = pluginOptionText_0.Label }); stackPanel.Children.Add((UIElement)textBox); return((FrameworkElement)stackPanel); }
public string GetConfiguration(Dictionary <string, PluginOption> s) { PluginOptionBoolean pluginOptionBoolean1 = s["Videos"] as PluginOptionBoolean; PluginOptionBoolean pluginOptionBoolean2 = s["Rename"] as PluginOptionBoolean; PluginOptionBoolean pluginOptionBoolean3 = s["OriginalContent"] as PluginOptionBoolean; PluginOptionBoolean pluginOptionBoolean4 = s["Tags"] as PluginOptionBoolean; PluginOptionBoolean pluginOptionBoolean5 = s["PhotoRaw"] as PluginOptionBoolean; PluginOptionBoolean pluginOptionBoolean6 = s["Photos"] as PluginOptionBoolean; PluginOptionText pluginOptionText1 = s["Username"] as PluginOptionText; PluginOptionText pluginOptionText2 = s["Password"] as PluginOptionText; TumblrSettings tumblrSettings = new TumblrSettings(); int num1 = pluginOptionBoolean6.Value ? 1 : 0; tumblrSettings.DoPhotos = num1 != 0; int num2 = 0; tumblrSettings.DoPhotoSets = num2 != 0; int num3 = pluginOptionBoolean1.Value ? 1 : 0; tumblrSettings.DoVideos = num3 != 0; int num4 = pluginOptionBoolean2.Value ? 1 : 0; tumblrSettings.DoRename = num4 != 0; int num5 = !pluginOptionBoolean3.Value ? 1 : 0; tumblrSettings.DoReblogs = num5 != 0; int num6 = pluginOptionBoolean4.Value ? 1 : 0; tumblrSettings.DoTags = num6 != 0; string str = ""; tumblrSettings.FilenameMask = str; int num7 = pluginOptionBoolean5.Value ? 1 : 0; tumblrSettings.DoPhotoRaw = num7 != 0; TumblrSettings settings = tumblrSettings; settings.Username = pluginOptionText1.Value; settings.Password = pluginOptionText2.Value; return(this.writeSettings(settings)); }
public Dictionary <string, PluginOption> GetControlPanel(string s) { Dictionary <string, PluginOption> dictionary = new Dictionary <string, PluginOption>(); TumblrSettings tumblrSettings = this.method_0(s); string key1 = "Photos"; PluginOptionBoolean pluginOptionBoolean1 = new PluginOptionBoolean("Download Photos", tumblrSettings.DoPhotos); dictionary.Add(key1, (PluginOption)pluginOptionBoolean1); string key2 = "Videos"; PluginOptionBoolean pluginOptionBoolean2 = new PluginOptionBoolean("Download Videos", tumblrSettings.DoVideos); dictionary.Add(key2, (PluginOption)pluginOptionBoolean2); string key3 = "PhotoRaw"; PluginOptionBoolean pluginOptionBoolean3 = new PluginOptionBoolean("Download Original Photos (Slower)", tumblrSettings.DoPhotoRaw); dictionary.Add(key3, (PluginOption)pluginOptionBoolean3); string key4 = "OriginalContent"; PluginOptionBoolean pluginOptionBoolean4 = new PluginOptionBoolean("Download Only Original Content", !tumblrSettings.DoReblogs); dictionary.Add(key4, (PluginOption)pluginOptionBoolean4); string key5 = "Rename"; PluginOptionBoolean pluginOptionBoolean5 = new PluginOptionBoolean("Rename files using Post title", tumblrSettings.DoRename); dictionary.Add(key5, (PluginOption)pluginOptionBoolean5); string key6 = "Tags"; PluginOptionBoolean pluginOptionBoolean6 = new PluginOptionBoolean("Include Tags in filename", tumblrSettings.DoTags); dictionary.Add(key6, (PluginOption)pluginOptionBoolean6); string key7 = "Username"; PluginOptionText pluginOptionText1 = new PluginOptionText("Username", tumblrSettings.Username); dictionary.Add(key7, (PluginOption)pluginOptionText1); string key8 = "Password"; PluginOptionText pluginOptionText2 = new PluginOptionText("Password", tumblrSettings.Password); dictionary.Add(key8, (PluginOption)pluginOptionText2); return(dictionary); }
public string GetConfiguration(Dictionary <string, PluginOption> s) { PluginOptionBoolean pluginOptionBoolean1 = s["Videos"] as PluginOptionBoolean; PluginOptionBoolean pluginOptionBoolean2 = s["Photos"] as PluginOptionBoolean; PluginOptionText pluginOptionText1 = s["Tag"] as PluginOptionText; PluginOptionText pluginOptionText2 = s["Limit"] as PluginOptionText; int result = 10000; int.TryParse(pluginOptionText2.Value, out result); InstagramSettings settings = new InstagramSettings(); settings.Tag = pluginOptionText1.Value; int num1 = pluginOptionBoolean2.Value ? 1 : 0; settings.doPhotos = num1 != 0; int num2 = pluginOptionBoolean1.Value ? 1 : 0; settings.doVideos = num2 != 0; int num3 = result; settings.LimitItems = num3; return(this.writeSettings(settings)); }